Learn R Programming

CodelistGenerator (version 3.5.0)

stratifyByDoseUnit: Stratify a codelist by dose unit.

Description

Stratify a codelist by dose unit.

Usage

stratifyByDoseUnit(x, cdm, keepOriginal = FALSE)

Value

The codelist with the required stratifications, as different elements of the list.

Arguments

x

A codelist.

cdm

A cdm reference via CDMConnector.

keepOriginal

Whether to keep the original codelist and append the stratify (if TRUE) or just return the stratified codelist (if FALSE).

Examples

Run this code
# \donttest{
library(CodelistGenerator)
cdm <- mockVocabRef()
codes <- list("concepts" = c(20,21))
new_codes <- stratifyByDoseUnit(x = codes,
                                cdm = cdm,
                                keepOriginal = TRUE)
new_codes
# }

Run the code above in your browser using DataLab