Learn R Programming

icd9 (version 0.2.1)

parseQuanDeyoSas: parse original SAS code defining Quan's update of Deyo comorbidities.

Description

As with parseAhrqSas, this function reads SAS code, and in, a very limited way, extracts definitions. In this case the code uses LET statements, with strings or lists of strings. This saves and invisibly returns a list with names corresponding to the comorbidities and values as a vector of 'short' form (i.e. non-decimal) ICD9 codes. Unlike parseAhrqSas, there are no ranges defined, so this interpretation is simpler.

Usage

parseQuanDeyoSas(sasPath = NULL, condense = FALSE, save = FALSE,
  saveDir = "~/icd9/data")

Arguments

sasPath
single character string containing path or URL for some SAS code. The source SAS code is stored in extdata or at the location specified in URL. In development mode in devtools, this is actually inst/extdata. This function is internal, since i
condense
logical whether to condense the result ranges to the minimal set of parent ICD-9 codes which exactly define the list. Defaults to FALSE so that the saved list will allow rapid look-up of codes without further processing. Small memory versus t
save
logical whether to save the result in the source tree. Defaults to FALSE.
saveDir
path to directory to save the data. This is typically the data folder in the devleopment source tree. Defaults to "~/icd9/data". Could possibly avoid hard-coding path with devtools functions.

Value

  • invisibly returns the list of vectors, where a co-morbidity name is associated with a character vector of ICD-9 codes.