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

could not find function "score" #46

Closed Flora-love-cat closed 2 years ago

Flora-love-cat commented 2 years ago

When I tried to calculate the Charlson score by the following code in tutorial, it prompted Error in score(charlson, weights = NULL, assign0 = FALSE) : could not find function "score". I wonder if the unweighted score calculated by score function is same as the score column in Charlson table?

unw_cci <- score(charlson, weights=NULL, assign0=FALSE)
ellessenne commented 2 years ago

Hi, I suspect you are following the code tutorial for the latest version of {comorbidity}, but have a previous one (where the score() function did not exist). I would suggest trying to update.packages(ask = F) all your packages and try again, hopefully it is a simple fix!

Flora-love-cat commented 2 years ago

thanks, it fixed my issues. I didn't realize the package was updated before!

ellessenne commented 2 years ago

No worries, glad to hear it is now sorted!