View source: R/prep_add_missing_codes.R
| prep_add_missing_codes | R Documentation |
NAs based on rulesInsert missing codes for NAs based on rules
prep_add_missing_codes(
resp_vars,
study_data,
meta_data_v2,
item_level = "item_level",
label_col,
rules,
use_value_labels,
overwrite = FALSE,
meta_data = item_level
)
resp_vars |
variable list the name of the measurement variables to be
modified, all from |
study_data |
data.frame the data frame that contains the measurements |
meta_data_v2 |
character path to workbook like metadata file, see
|
item_level |
data.frame the data frame that contains metadata attributes of study data |
label_col |
variable attribute the name of the column in the metadata with labels of variables |
rules |
data.frame with the columns:
|
use_value_labels |
logical In rules for factors, use the value labels,
not the codes. Defaults to |
overwrite |
logical Also insert missing codes, if the values are not
|
meta_data |
data.frame old name for |
a list with the entries:
ModifiedStudyData: Study data with NAs replaced by the CODE_VALUE
ModifiedMetaData: Metadata having the new codes amended in the columns
JUMP_LIST or MISSING_LIST, respectively
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.