icd (version 4.0.6)

with_icd10cm_version: Evaluate code with a particular version of ICD-10-CM

Description

Temporarily sets and restores the option icd.data.icd10cm_active_year, analogous to functions in withr.

Usage

with_icd10cm_version(ver, code)

Arguments

ver

Character vector of length one: the version of ICD-10-CM to use, corresponding to the suffix of the data.frame name, e.g., for 2019 ICD-10-CM, use "icd10cm2019" for Dutch 2014 ICD-CM translations, use "icd10cm2014_nl"

code

Code block to execute, may be in braces, or a single statement without braces.

Examples

Run this code
# NOT RUN {
icd:::.show_options()
with_icd10cm_version("2014", icd:::.show_options())
# }

Run the code above in your browser using DataCamp Workspace