Skip to content

Commit

Permalink
Merge branch 'master' into #51
Browse files Browse the repository at this point in the history
  • Loading branch information
ellessenne committed Jul 12, 2022
2 parents 80674df + 5fb5bd0 commit 7b36f16
Show file tree
Hide file tree
Showing 39 changed files with 726 additions and 1,167 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Type: Package
Package: comorbidity
Version: 1.0.2
Version: 1.0.3.9000
Title: Computing Comorbidity Scores
Description: Computing comorbidity indices and scores such as the weighted Charlson
score (Charlson, 1987 <doi:10.1016/0021-9681(87)90171-8>) and the Elixhauser
Expand Down Expand Up @@ -52,7 +52,7 @@ Suggests:
rmarkdown,
testthat
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.0
Encoding: UTF-8
LazyData: true
ByteCompile: true
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ pre_submission_test:
R -e "devtools::check_win_devel(quiet = TRUE)"
R -e "devtools::check_win_release(quiet = TRUE)"
R -e "devtools::check_win_oldrelease(quiet = TRUE)"
R -e "rhub::check_for_cran()"
R -e "devtools::check_mac_release(quiet = TRUE)"
# R -e "rhub::check_for_cran()"
R -e "rhub::check(platform = 'macos-m1-bigsur-release')"
make style

Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# comorbidity (development version)

# comorbidity 1.0.3

* Fixed a bug that did not allowed ID columns other than numeric (#55, thanks @norihikorihiko for reporting this).

# comorbidity 1.0.2

* The `copd` comorbidity for the Charlson index has been renamed to `cpd`, and the `ami` comorbidity for the Charlson index has been renamed to `mi` (#53, thanks @DrYan1102). Please be aware that this might break some old code if you were selecting comorbidities by name.
* The `copd` and `ami` comorbidities for the Charlson index have been renamed to `cpd` and `mi`, respectively (#53, thanks @DrYan1102). Please be aware that this might break some old code if you were selecting comorbidities by name.

* New dataset: ICD10-CM, 2022 version, named `icd10cm_2022`.

Expand Down
16 changes: 0 additions & 16 deletions R/comorbidity.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,6 @@
#' @export

comorbidity <- function(x, id, code, map, assign0, labelled = TRUE, tidy.codes = TRUE) {
# set.seed(1)
# x <- data.frame(
# id = 1,
# code = sample_diag(10),
# stringsAsFactors = FALSE
# )
# xa <- data.frame(id = 1:2, code = NA_character_)
# xm <- rbind(x, xa)
#
# x = xm
# id = "id"
# code = "code"
# map = "charlson_icd10_quan"
# assign0 = FALSE
# labelled = T
# tidy.codes = T
### Check arguments
arg_checks <- checkmate::makeAssertCollection()
# x must be a data.frame (or a data.table)
Expand Down
4 changes: 2 additions & 2 deletions R/matchit.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
if (!is.null(x[["NA"]])) x[, `NA` := NULL]

### Restore IDs
x <- merge(x, backup, by = id, all.y = TRUE, )
data.table::setnafill(x = x, type = "const", fill = 0L)
x <- merge(x, backup, by = id, all.y = TRUE)
data.table::setnafill(x = x, type = "const", fill = 0L, cols = which(names(x) != id))

### Add missing columns
for (col in names(regex)) {
Expand Down
6 changes: 3 additions & 3 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.onAttach <- function(libname, pkgname) {
tick <- stats::rbinom(n = 1, size = 1, prob = 0.4)
tick <- stats::rbinom(n = 1, size = 1, prob = 0.3)
if (tick == 1) {
packageStartupMessage("This is {comorbidity} version 1.0.2.")
packageStartupMessage("A lot has changed since the last release on CRAN, please check-out breaking changes here:")
packageStartupMessage("This is {comorbidity} version 1.0.3.")
packageStartupMessage("A lot has changed since the pre-1.0.0 release on CRAN, please check-out breaking changes here:")
packageStartupMessage("-> https://ellessenne.github.io/comorbidity/articles/C-changes.html")
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# The {comorbidity} Package: Computing Comorbidity Scores <img src="man/figures/hex.png" width = "150" align="right" />

Last updated: 2022-04-06
Last updated: 2022-07-12

<!-- badges: start -->

Expand Down
3 changes: 1 addition & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
## Test environments

* local R installation, R 4.1.2, Intel-based macOS Big Sur 11.6.2
* local R installation, R 4.2.1, Intel-based macOS Monterey 12.4
* ubuntu-latest (via GitHub Actions, devel, release, oldrel, 3.5, 3.4)
* windows-latest (via GitHub Actions, devel, release, oldrel, 3.5, 3.4)
* macos-latest (via GitHub Actions, release, oldrel)
* windows (via winbuilder, devel, release, oldrel)
* rhub (with rhub::check_for_cran())
* arm64 mac (via macbuilder)
* arm64 mac (via rhub::check(platform = 'macos-m1-bigsur-release'))

Expand Down
5 changes: 2 additions & 3 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 14 additions & 48 deletions docs/CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 9 additions & 27 deletions docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7b36f16

Please sign in to comment.