Create unique row identifier
create_join_column.Rd
Create unique row identifier
Arguments
- df
a data.frame or tibble
- by_colums
columns to uniquely identify a row
- new_by_column_name
the new bs4Dash::column name
Examples
# using dfdiffs::InitialData
InitialData <- dfdiffs::InitialData
create_join_column(df = InitialData,
by_colums = c('subject_id', 'record'),
new_by_column_name = 'join_var')
#> # A tibble: 5 × 8
#> join_var subject_id record text_val…¹ text_…² created_…³ updated_…⁴ entered_…⁵
#> <chr> <chr> <dbl> <chr> <chr> <date> <date> <date>
#> 1 A-1 A 1 Issue unr… Fatigue 2021-07-29 2021-09-29 2021-09-29
#> 2 A-2 A 2 Issue unr… Fatigue 2021-07-29 2021-10-03 2021-10-29
#> 3 B-3 B 3 Issue res… Fever 2021-07-16 2021-09-02 2021-08-18
#> 4 C-4 C 4 Issue res… Joint … 2021-08-24 2021-10-03 2021-10-03
#> 5 C-5 C 5 Issue res… Joint … 2021-08-24 2021-09-20 2021-10-20
#> # … with abbreviated variable names ¹text_value_a, ²text_value_b,
#> # ³created_date, ⁴updated_date, ⁵entered_date