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