read_ct_spec: Read in a controlled terminology

View source: R/ct.R

read_ct_specR Documentation

Read in a controlled terminology

Description

read_ct_spec() imports a controlled terminology specification data set as a tibble.

Usage

read_ct_spec(file = cli::cli_abort("`file` must be specified"))

Arguments

file

A path to a file containing a controlled terminology specification data set. The following are expected of this file:

  • The file is expected to be a CSV file;

  • The file is expected to contain a first row of column names;

  • This minimal set of variables is expected: codelist_code, collected_value, term_synonyms, and term_value.

Value

A tibble with a controlled terminology specification.

Examples

# Get the local path to one of the controlled terminology example files.
path <- ct_spec_example("ct-01-cm")

# Import it to R.
read_ct_spec(file = path)


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