powered by
Fetch a label for a variable based on its purpose
prep_get_labels( resp_vars, meta_data = "item_level", label_col, max_len = MAX_LABEL_LEN, label_class = c("SHORT", "LONG"), label_lang = "", resp_vars_are_var_names_only = FALSE )
character suitable labels for each resp_vars, names of this vector are VAR_NAMES
resp_vars
variable list the variable names to fetch for
meta_data the metadata, item-level
variable attribute the name of the column in the metadata with labels of variables
integer the maximum label length to return, if not possible w/o causing ambiguous labels, the labels may still be longer
enum SHORT | LONG. which sort of label according to the metadata model should be returned
character optional language suffix, if available in the metadata
logical If TRUE, do not use other labels than VAR_NAMES for finding resp_vars in meta_data
TRUE
meta_data
if (FALSE) { prep_load_workbook_like_file("meta_data_v2") prep_get_labels("SEX_0", label_class = "SHORT", max_len = 2) }
Run the code above in your browser using DataLab