comorbidity version 1.0.0 is a release that substantially modifies and updates the package API.
There is a lot of improvements, in terms of performance, supported algorithms, and user-facing functions; see e.g. this thread on GitHub.
Specific user-facing changes, including examples of the new API, are discussed in more detail here: https://ellessenne.github.io/comorbidity/articles/C-changes.html
If required, you can revert to the previous release by installing from GitHub:
A startup message pointing out the changes in the API is now displayed with 50% probability when attaching the package, and will be removed in future releases.
comorbidity now accepts
data.table objects as input (#23);
comorbidity can deal with non-syntactically valid names (#25);
Fixed coding typo in vignette (#10, #26);
Reduced number of random tests, as R CMD check was taking too long on some platforms getting killed on CRAN (as reported by Kurt Hornik).
data.tablethat only occurred when the input dataset had extra columns other than
melt generic in
data.table has been deprecated; the dependency on
reshape2 has now been removed;
Fixed bugs introduced by switching to
comorbidity 0.5.0: column names
code were expecting these specific names, now fixed and behaves as expected.
comorbidity is now 10+ times faster, thanks to Jonathan Williman contributing code based on the
Fixed typo in vignette regarding weighting algorithm for the AHRQ Elixhauser comorbidity score (#14, thanks to @cornflakegrl);
pkgdown website: https://ellessenne.github.io/comorbidity.
Modified the behaviour of the
assign0 argument after further discussion with Anders Alexandersson in Issue #9: now there is no default, forcing the user to decide whether to apply a hierarchy of comorbidity codes or not. This will make the algorithm more transparent to the end user, allowing an informed choice. See
vignette("comorbidityscores", package = "comorbidity") for further details on the hierarchy being applied.
comorbidity now returns two Elixhauser scores, one computed using the algorithm of van Walraven et al. (2009) and a second one computed using the AHRQ algorithm (Moore et al., 2017). Thanks to Yumiko Abe-Jones for feedback and the discussion regarding weighted Elixhauser scores.
More information can be found on the package vignette:
vignette("comorbidityscores", package = "comorbidity").
comorbiditynow defaults to
assign0now explains in details what hierarchy of comorbidities is applied;
comorbidityis faster, with a conservative estimated speed-up of >60%;
score argument from
comorbidity has been split into
icd. For instance, the command
comorbidity(x = x, id = "id", code = "code", score = "charlson_icd10") has to be modified as
r comorbidity(x = x, id = "id", code = "code", score = "charlson", icd = "icd10"). The default value of
icd10, for ICD-10 codes, and possible values are
australia10datasets, imported from Stata version 15.
Bug fix: Fixed a bug in the regex for the ICD10 Charlson score; Fixed a bug in the regex for the ICD10 Elixhauser score.
citation("comorbidity")now returns a properly formatted entry.
sample_diag_icd10()function renamed back to
sample_diag(), as now can simulate ICD-9-CM codes too
icd10_2011with ICD-10 codes, 2009 and 2011 versions (respectively)
sample_diag_icd10and simulates proper ICD-10 codes
comorbidityas it now can compute more than just the Charlson score
charlsonis marginally faster
charlsonusing only base R functions
NEWS.mdfile to track changes to the package
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.