Skip to contents

cl_code_to_term() maps SDTM terminology codelists' C-codes to respective terms. For mapping codes other than those representing codelists, use code_to_term() instead.

Usage

cl_code_to_term(code)

Arguments

code

A C-code with a leading character C followed by a sequence of digits used for uniquely identifying each SDTM terminology codelist.

Value

A character vector of SDTM terms for codelists. The number of elements returned matches the number of elements in code, i.e. there is a one-to-one correspondence between input and output. Invalid codes in code are mapped to NA.

See also

See cl_term_to_code() for the inverse operation.

Examples

cl_code_to_term(code = "C66731")
#> [1] "SEX"

# `code` is vectorized.
cl_code_to_term(code = c("C66731", "C66733"))
#> [1] "SEX"  "SIZE"

# Invalid codes (e.g. `"YODA"`) map to `NA`.
cl_code_to_term(code = c("C66731", "C66733", "C007"))
#> [1] "SEX"  "SIZE" NA