Learn R Programming

sdtm.oak (version 0.1.0)

assert_ct_spec: 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)

Value

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

Arguments

ct_spec

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