Skip to contents

clst_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

clst_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 clst_term_to_code() for the inverse operation.

Examples

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

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

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