
Stratify a codelist by the concepts included within it.
stratifyByConcept.Rd
Stratify a codelist by the concepts included within it.
Value
The codelist or a codelist with details with the required stratifications, as different elements of the list.
Examples
# \donttest{
library(CodelistGenerator)
cdm <- mockVocabRef()
#> Warning: There are observation period end dates after the current date: 2025-04-11
#> ℹ The latest max observation period end date found is 2025-12-31
codes <- list("concepts" = c(20,21))
new_codes <- stratifyByConcept(x = codes,
cdm = cdm,
keepOriginal = TRUE)
#> Warning: ! `codelist` casted to integers.
new_codes
#>
#> ── 3 codelists ─────────────────────────────────────────────────────────────────
#>
#> - concepts (2 codes)
#> - concepts_glucagon_nasal_powder (1 codes)
#> - concepts_nitrogen_topical_liquefied_gas (1 codes)
# }