View source: R/util_study_var2factor.R
util_study_var2factor | R Documentation |
Convert a study variable to a factor
util_study_var2factor(
resp_vars = NULL,
study_data,
meta_data = "item_level",
label_col = LABEL,
assume_consistent_codes = TRUE,
have_cause_label_df = FALSE,
code_name = c(JUMP_LIST, MISSING_LIST),
include_sysmiss = TRUE
)
resp_vars |
variable list the name of the measurement variables |
study_data |
data.frame the data frame that contains the measurements |
meta_data |
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 |
assume_consistent_codes |
logical assume, that missing codes are consistent for all variables |
have_cause_label_df |
logical is a missing-code table available |
code_name |
character all lists from the meta_data to use for the coding. |
include_sysmiss |
logical add also a factor level for data values
that were |
study_data
converted to factors using the coding provided in
code_name
Other data_management:
util_assign_levlabs()
,
util_check_data_type()
,
util_check_group_levels()
,
util_compare_meta_with_study()
,
util_dichotomize()
,
util_merge_data_frame_list()
,
util_rbind()
,
util_remove_na_records()
,
util_replace_hard_limit_violations()
,
util_table_of_vct()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.