Add variable labels for data set.
add_labels.Rd
This function labels variables such as sex
and cancer
in the dataset
based on the specified language and label type.
Arguments
- x
A data frame or tibble to be labeled.
- label_type
Type of label for the cancer variable. Options are:
"full" - Full descriptive labels.
"abbr" - Shortened labels.
"icd10" - ICD-10 codes only.
The default is "full".
- lang
Language of the labels. Options are:
"zh" - Chinese.
"en" - English.
The default is "zh".