Description Usage Arguments Examples
Get auxiliary information from a dataframe, and merge as JSON strings into master dataframe
1 2 3 4 5 6 7 8 | merge_aux_info_from_df(
master_df,
aux_df,
aux_info_colname,
by.x,
by.y,
verbose_merge = FALSE
)
|
master_df |
Dataframe containing master merge information (e.g. names of individuals) |
aux_df |
Dataframe containing auxiliary information |
aux_info_colname |
Column name in which to store auxiliary information as JSON objects |
by.x |
Merge key on master dataframe |
by.y |
Merge key on auxiliary dataframe |
verbose_merge |
boolean flag to print output while merging |
1 2 3 4 5 6 7 8 9 | individual_df = data.frame(name = c('Alex', 'Bob'), age = c(44, 33), stringsAsFactors = FALSE)
visit_df = data.frame(individual = c('Alex', 'Alex', 'Bob'),
visit_num = c(1, 2, 1),
reason = c('Baseline', 'Relapse', 'Baseline'),
temperature = c(99.5, 97.9, 99.2))
merge_aux_info_from_df(master_df = individual_df,
aux_df = visit_df,
aux_info_colname = 'visits__JSON',
by.x = 'name', by.y = 'individual')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.