is_ct_mappable: Identify CT mappable terms

View source: R/ct.R

is_ct_mappableR Documentation

Identify CT mappable terms

Description

is_ct_mappable() returns a logical vector indicating whether each element of x is found in the from values used for controlled terminology recoding.

Empty strings (blanks) and NA values are treated specially and are considered mappable terms, even though they might not be.

This function is useful for checking in advance which terms in a vector can be recoded given a specified controlled terminology mapping.

Usage

is_ct_mappable(x, from)

Arguments

x

A character vector of terms to be evaluated for recoding.

from

A character vector of controlled terminology terms that x will be compared against.

Value

A logical vector of the same length as x, where TRUE indicates the corresponding term in x is found in from, and FALSE otherwise.


sdtm.oak documentation built on June 9, 2025, 5:10 p.m.