ellessenne / comorbidity

An R package for computing comorbidity scores.
https://ellessenne.github.io/comorbidity/
GNU General Public License v3.0
80 stars 21 forks source link

New version breaks old code #48

Closed EarlGlynn closed 2 years ago

EarlGlynn commented 2 years ago

Where is your "What's new" documentation to explain what's new/what's changed for why old code that worked fine under comorbidity_0.5.3 no longer works?

I see this now when

elixhauser10 <- comorbidity(x       = icd10,
                           id      = "DiagnosisID",
                           code    = "DiagnosisCode",
                           score   = "elixhauser",
                           icd     = "icd10",
                           assign0 = FALSE)

Error in comorbidity(x = icd10, id = "DiagnosisID", code = "DiagnosisCode", : unused arguments (score = "elixhauser", icd = "icd10")

This is very frustrating in paper submission process for a minor re-run. In introducing improvements, why not let old code work just fine? Why not let map be new but support the old score?

ellessenne commented 2 years ago

Breaking changes were described in detail in the NEWS file and on the package website, including ways to revert to version 0.5.3 if needed.

It was not possible to introduce changes while still be 100% fully backwards compatible, but it should take a few minutes to update your code to the new version of the package if you wish to use the new version. Rewriting the internals of the package was necessary to have a better structured package and to future-proof it for some of the improvements that are in the pipeline.