View source: R/code_modify_func_multi.R
code_modify_func_multi | R Documentation |
Code modify function (multiple variables). To be called by the harmonization function.
code_modify_func_multi(
data = temp_dataset,
instruction = code_instruct,
old_var = source_item_long,
user_args = source_item,
sourcedataset = source_dataset,
subdomain = subdomain,
visit = visit,
cohort = cohort
)
data |
Dataframe to be modified |
instruction |
Coding instruction from harmonization sheet |
old_var |
Name of original variable |
user_args |
Character vector of input variables |
sourcedataset |
Dataframe created so far |
subdomain |
Category of variable |
visit |
Visit number |
cohort |
Cohort name |
Vector of length equal to old_var
# Example calculating BMI in cohort a for visit 1
code_modify_func_multi(data = cohort_a,
instruction = '(x1 / 2.205)/((x2 / 39.37)**2)',
old_var = 'weight_1; height_1',
user_args = c('weight_1','height_1'),
sourcedataset = 'cohort_a',
subdomain = 'clinical',
visit = 1,
cohort = 'cohort_a')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.