Temporarily sets and restores the option icd.icd10cm_active_year
,
analogous to functions in withr.
with_icd10cm_version(ver, code)
ver | Character vector of length one: the version of ICD-10-CM to use,
corresponding to the suffix of the |
---|---|
code | Code block to execute, may be in braces, or a single statement without braces. |
icd:::.show_options()#> $icd.cache #> [1] "/home/jack/.cache/R/icd" #> #> $icd.offline #> [1] FALSE #> #> $icd.who_url #> [1] "https://icd.who.int/browse10" #>with_icd10cm_version("2014", icd:::.show_options())#> $icd.cache #> [1] "/home/jack/.cache/R/icd" #> #> $icd.icd10cm_active_year #> [1] "2014" #> #> $icd.offline #> [1] FALSE #> #> $icd.who_url #> [1] "https://icd.who.int/browse10" #>