This function labels variables such as sex
and cancer
in the dataset
based on the specified language and label type.
add_labels(x, label_type = "full", lang = "zh", as_factor = TRUE)
Arguments
- x
A data frame or tibble to be labeled.
- label_type
Type of the label used ("full" or "abbr").
- lang
Character, specify the output language, options are 'cn',
or 'en', default is 'cn'.
- as_factor
Logical, indicate whether output value as factor.
Value
A data frame or tibble with labeled variables.