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

View source: R/icd-cm-ver.R

with_icd10cm_versionR Documentation

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

Description

Temporarily sets and restores the option icd.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

icd:::.show_options()
with_icd10cm_version("2014", icd:::.show_options())

jackwasey/icd documentation built on Dec. 22, 2024, 4:47 a.m.