Closed axjadamson closed 4 years ago
Thanks for the heads-up!
This is unexpected, and I can reproduce the error. I will look into it, thanks for reporting this bug!
Hi again @axjadamson, I just pushed a patch to the development version (here on GitHub), could you install it using devtools::install_github("ellessenne/comorbidity")
and check if the issue is solved?
I added a couple of tests and it looks ok on my side, but it'd be great to have your feedback before closing this issue.
Thanks!
Hi ellessenne, Thank you very much for looking at this so quickly. I'm sorry but I haven't been able to check the new code, due to an issue with the install_github command (this one: https://stackoverflow.com/questions/57777382/cannot-install-an-r-package-from-github). However, if you think it's sorted then I trust your judgement! Alex
Hi Ellessenne I found the same thing for code, when I changed "diag" to "code" it worked. It was all working before I updated to the latest version of R so I don't know if it's something to do with the order I've reinstalled my packages. Thanks Laura
charls<-comorbidity(x = diag2, id = "id", code = "diag",
@axjadamson Sorry to hear you are having issues with devtools::install_github
- if you send me an e-mail at ag475[at]le.ac.uk I can send you a pre-built version with instructions on how to install it for you to check!
@lauramrp Thanks for reporting this - I think it is the same issue that I just fixed for the ID variable, so it should be relatively straightforward to fix. I'll keep you posted!
Hi @axjadamson and @lauramrp, I think I fixed the second issue (with the code
variable) as well.
Any feedback is welcome before I go ahead and close this issue / submit an update to CRAN!
Try using the remotes
package to install the dev version from GitHub:
# install.packages("remotes")
remotes::install_github("ellessenne/comorbidity")
Hi @ellessenne, I tried what you suggested and received this error:
'Error: Failed to install 'comorbidity' from GitHub: (converted from warning) cannot remove prior installation of package ‘backports’
I think you should go ahead with the update regardless!
Hi @axjadamson and @lauramrp, a new version of comorbidity
is on its way to CRAN - please give it a go once it gets there!
Hello, I have been trying to use your comorbidity package. Thank you for creating it, it's great. I just thought I'd report an issue I found, which is that the id column must be named 'id' for the function to work. I think this should either be stated in the package or the function should be made more generalisable.
This is my first time using Github so please forgive me if I haven't formed this comment in the right way or in the right place!
Alex
Reproducible code:
x <- data.frame( id = sample(1:15, size = 200, replace = TRUE), code = sample_diag(200), stringsAsFactors = FALSE )
colnames(x) <- c("testid", "code")
comorbidity(x = x, id = "testid", code = "code", score = "charlson", assign0 = TRUE, tidy.codes = TRUE)