This function is used to replace the value of multiple columns in the dataset based on the provided corresponding input values.
Arguments
- .data
Data.frame
- phaseVar
Variable name for the ADNI study protocol, Default: "PHASE"
- input_values
A nested list values of each columns associated with corresponding ADNI study phase and the format will be: [column_name][[phase_name]]$values
code Value that will be replaced
decode Values that will replace coded value (code)
See also
Other functions to replace values:
convert_to_missing_value()
,
replace_values_phase_specific()
,
replace_values_single_var()
Examples
if (FALSE) { # \dontrun{
data_dict_dd <- get_factor_levels_datadict(
.datadic = ADNIMERGE2::DATADIC,
tbl_name = NULL,
nested_value = TRUE
)
all_fld_name <- get_factor_fldname(
.datadic = data_dict_dd,
tbl_name = "REGISTRY",
dd_fldnames = colnames(ADNIMERGE2::REGISTRY)
)
input_values <- collect_value_mapping(
.datadic = data_dict_dd,
tbl_name = "REGISTRY",
all_fld_name = all_fld_name
)
result_dataset <- replace_values_dataset(
.data = ADNIMERGE2::REGISTRY,
phaseVar = "COLPROT",
input_values = input_values
)
} # }