ct_mappings: Controlled terminology mappings

View source: R/ct.R

ct_mappingsR Documentation

Controlled terminology mappings

Description

ct_mappings() takes a controlled terminology specification and returns the mappings in the form of a tibble in long format, i.e. the recoding of values in the from column to the to column values, one mapping per row.

The resulting mappings are unique, i.e. if from values are duplicated in two from columns, the first column indicated in from takes precedence, and only that mapping is retained in the controlled terminology map.

Usage

ct_mappings(ct_spec, from = ct_spec_vars("from"), to = ct_spec_vars("to"))

Arguments

ct_spec

Controlled terminology specification as a tibble. Each row is for a mapped controlled term. Controlled terms are expected in the column indicated by to_col.

from

A character vector of column names indicating the variables containing values to be recoded.

to

A single string indicating the column whose values are to be recoded into.

Value

A tibble with two columns, from and to, indicating the mapping of values, one per row.


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