View source: R/keep.relevant.variables.r
This function takes as only input the study data data frame and keeps only those variables that are relevant to the study
1 2 | keep.relevant.variables(study_data, data_dictionary = NULL,
variables_to_keep = NULL, variables_to_drop = NULL)
|
study_data |
The study data as a data frame. No default |
data_dictionary |
The data dictionary. Defaults to NULL. If provided, variables_to_keep will be defined as unlist(lapply(data_dictionary, function(x) if(x$c == "No") x$vn)) |
variables_to_keep |
Character vector of variables to keep. Defaults to NULL. Ignored if data_dictionary is not NULL. |
variables_to_drop |
Character vector of variables to drop. Defaults to NULL. Currently ignored. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.