Skip to contents

This function labels variables such as sex and cancer in the dataset based on the specified language and label type.

Usage

add_labels(x, label_type = "full", lang = "zh")

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".

Value

A data frame or tibble with labeled variables.