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.With thanks to Dr. Quan, I have permission to distribute his SAS code. Previously, the SAS code would be downloaded from the University of Manitoba at http://mchp-appserv.cpe.umanitoba.ca/concept/ICD9_E_Charlson.sas.txt. There are structural differences between this version and the version directly from Dr. Quan, however, the parsing results in identical data.
parseQuanDeyoSas(sasPath = NULL, condense = FALSE, save = FALSE, path = "data")
devtools
, this is actually
inst/extdata. This function is internal, since it is used to generate data
which ends up in the distributed package. However, the package user can
verify that the code creates the distributed R data. Also, changes to the
original SAS code can be used to regenerate the R data by the user, without
waiting for a package release.FALSE
so that the saved list will allow rapid look-up of codes
without further processing. Small memory versus time trade-off.FALSE
."~/icd9/data"
.
Could possibly avoid hard-coding path with devtools functions.