Convert variable according to the Standard for dataset of CR in China

tidy_var(
  x,
  var_name = "occu",
  label_type = "full",
  lang = "code",
  as_factor = FALSE
)

Arguments

x

Character values of variable to be converted.

var_name

Character value indicate name of the variable.

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 formatted value.