assert_ct_spec: Assert a controlled terminology specification

View source: R/ct.R

assert_ct_specR Documentation

Assert a controlled terminology specification

Description

assert_ct_spec() will check whether ct_spec is a data frame and if it contains the variables: codelist_code, collected_value, term_synonyms, and term_value.

In addition, it will also check if the data frame is not empty (no rows), and whether the columns codelist_code and term_value do not contain any NA values.

Usage

assert_ct_spec(ct_spec, optional = FALSE)

Arguments

ct_spec

A data frame to be asserted as a valid controlled terminology data set.

Value

The function throws an error if ct_spec is not a valid controlled terminology data set; otherwise, ct_spec is returned invisibly.


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