assert_ct_clst: Assert a codelist code

View source: R/ct.R

assert_ct_clstR Documentation

Assert a codelist code

Description

assert_ct_clst() asserts the validity of a codelist code in the context of a controlled terminology specification.

Usage

assert_ct_clst(ct_spec, ct_clst, optional = FALSE)

Arguments

ct_spec

Either a data frame encoding a controlled terminology data set, or NULL.

ct_clst

A string with a to-be asserted codelist code, or NULL.

optional

A scalar logical, indicating whether ct_clst can be NULL or not.

Value

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.


sdtm.oak documentation built on April 3, 2025, 9:37 p.m.