assert_ct_clst()
asserts the validity of a codelist code in the context of
a controlled terminology specification.
assert_ct_clst(ct_spec, ct_clst, optional = FALSE)
The function throws an error if ct_clst
is not a valid codelist code
given the controlled terminology data set; otherwise, ct_clst
is returned
invisibly.
Either a data frame encoding a controlled terminology data set, or
NULL
.
A string with a to-be asserted codelist code, or NULL
.
A scalar logical, indicating whether ct_clst
can be NULL
or
not.