Skip to content

Commit

Permalink
Some further edits to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ellessenne committed Jan 17, 2022
1 parent 5125ed4 commit 0856b42
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 7 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Modified the behaviour of the `assign0` argument after further discussion with [

### BREAKING CHANGES

`comorbidity` now returns two Elixhauser scores, one computed using the algorithm of val 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.
`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")`.

Expand Down
2 changes: 1 addition & 1 deletion R/score.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' * `charlson`, for the original weights by Charlson et al. (1987);
#' * `quan`, for the revised weights by Quan et al. (2011).
#' Possible values for the Elixhauser score are:
#' * `vw`, for the weights by van Walraver et al. (2009);
#' * `vw`, for the weights by van Walraven et al. (2009);
#' * `swiss`, for the Swiss Elixhauser weights by Sharma et al. (2021).
#'
#' Defaults to `NULL`, in which case an unweighted score will be used.
Expand Down
4 changes: 4 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ Weighted an unweighted comorbidity scores can be obtained using the `score()` fu

```{r score}
unw_cci <- score(charlson, weights = NULL, assign0 = FALSE)
unw_cci
quan_cci <- score(charlson, weights = "quan", assign0 = FALSE)
quan_cci
all.equal(unw_cci, quan_cci)
```

Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ For instance, we could simulate ICD-10 codes:
``` r
# load the comorbidity package
library(comorbidity)
## This is {comorbidity} version 1.0.0.
## A lot has changed since the last release on CRAN, please check-out breaking changes here:
## -> https://ellessenne.github.io/comorbidity/articles/C-changes.html
# set a seed for reproducibility
set.seed(1)
# simulate 50 ICD-10 codes for 5 individuals
Expand Down Expand Up @@ -193,7 +196,19 @@ Weighted an unweighted comorbidity scores can be obtained using the

``` r
unw_cci <- score(charlson, weights = NULL, assign0 = FALSE)
unw_cci
## [1] 2 1 0
## attr(,"map")
## [1] "charlson_icd10_quan"

quan_cci <- score(charlson, weights = "quan", assign0 = FALSE)
quan_cci
## [1] 6 2 0
## attr(,"map")
## [1] "charlson_icd10_quan"
## attr(,"weights")
## [1] "quan"

all.equal(unw_cci, quan_cci)
## [1] "Attributes: < Length mismatch: comparison on first 1 components >"
## [2] "Mean relative difference: 1.666667"
Expand Down
3 changes: 3 additions & 0 deletions docs/articles/A-introduction.html

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

3 changes: 3 additions & 0 deletions docs/articles/C-changes.html

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

15 changes: 15 additions & 0 deletions docs/index.html

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

2 changes: 1 addition & 1 deletion docs/news/index.html

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

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ articles:
A-introduction: A-introduction.html
B-comorbidity-scores: B-comorbidity-scores.html
C-changes: C-changes.html
last_built: 2022-01-17T13:49Z
last_built: 2022-01-17T14:52Z
urls:
reference: https://ellessenne.github.io/comorbidity/reference
article: https://ellessenne.github.io/comorbidity/articles
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/score.html

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

2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion man/score.Rd

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

0 comments on commit 0856b42

Please sign in to comment.