Skip to content

Commit

Permalink
version 1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
stulacy authored and cran-robot committed Dec 15, 2019
1 parent 49b88e7 commit 6b59ffb
Show file tree
Hide file tree
Showing 14 changed files with 234 additions and 243 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: multistateutils
Type: Package
Title: Utility Functions for Parametric Multi-State Models
Version: 1.2.3
Date: 2019-11-07
Version: 1.2.4
Date: 2019-12-14
Author: Stuart Lacy
Maintainer: Stuart Lacy <stuart.lacy@gmail.com>
Description: Provides functions for working with multi-state modelling,
Expand All @@ -16,9 +16,9 @@ Suggests: covr, knitr, flexsurv, mstate, microbenchmark, rmarkdown,
URL: https://github.com/stulacy/multistateutils
BugReports: https://github.com/stulacy/multistateutils/issues
LinkingTo: Rcpp
RoxygenNote: 6.1.1
RoxygenNote: 7.0.2
VignetteBuilder: knitr
NeedsCompilation: yes
Packaged: 2019-11-07 21:17:12 UTC; stuart
Packaged: 2019-12-14 23:54:48 UTC; stuart
Repository: CRAN
Date/Publication: 2019-11-07 22:50:02 UTC
Date/Publication: 2019-12-15 16:50:07 UTC
26 changes: 13 additions & 13 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
6cfa156e03e842a8b84f0783a1cf4da7 *DESCRIPTION
f449813f542c09ae6f64763442798baf *DESCRIPTION
a1ae93d2c87fcc5f98452956facfdedf *NAMESPACE
79233a95319564d327ca10c567659416 *NEWS.md
86d48d123cc8e734ded681a9c6955877 *NEWS.md
0a91d61ac2ba351a6ca6a640bea450a8 *R/RcppExports.R
b1dbcdf5b70b84232533a3cfe8cf0ec2 *R/cohort.R
5795f711de63e297c77b4b61e5d1fcc7 *R/length_of_stay.R
Expand All @@ -9,26 +9,26 @@ ac7e40966b058f5596304f9b7e3516ca *R/multistateutils.R
1f182e54f53c05a90a759b5e3c3e599a *R/run_simulation.R
aa5c6bd41802ac1354513df6612de673 *R/statepathways.R
438b1342adbd6fc74092e2dd0b8d0499 *R/transition_probabilities.R
ef88f74fe85ac74eec6bd37ddb2116b2 *R/utils.R
8427576549844a2b20589a5796e0603a *R/utils.R
725ec67436f98afd433693db94193e00 *README.md
d41d8cd98f00b204e9800998ecf8427e *TODO
d76ab1ddde1f2984861068978adfbd99 *build/vignette.rds
26f953065122cd33ff110e10fdecf17b *inst/doc/Examples.R
2d6989b9de5b6a47e8ccbd78ef0dc82f *inst/doc/Examples.R
c28411b84a26af651d53480d3a39082b *inst/doc/Examples.Rmd
68f84f52a3e8470de3de8aa6b3ff691f *inst/doc/Examples.html
6b3f2cc5910bce7dfe286c5e106ddebb *man/cohort_simulation.Rd
7db3576cf60e4e65a16117f021608430 *man/length_of_stay.Rd
8b4c29799f2a385cafd351c601e8b0b3 *man/msprep2.Rd
9e0ca400531a052050b92d9af7090f71 *man/multistateutils.Rd
a5727825046d69ecd638dfc32e12ec8b *man/plot_predicted_pathway.Rd
27b90cf9061911ba15390514271257d4 *man/predict_transitions.Rd
364108fd54aede174001437672564fd6 *inst/doc/Examples.html
d1073645dfc1b9e8b19f8aa858aa8b22 *man/cohort_simulation.Rd
a96a8585f0eb3c3ae6364e8b9da360ed *man/length_of_stay.Rd
38a8902a4adf37d4b97f4426a8851d22 *man/msprep2.Rd
a083f778fcbe856f1ce351a2e7c079a3 *man/multistateutils.Rd
c3ac7b71f9f5f1578e7fb9328585db92 *man/plot_predicted_pathway.Rd
190a5c890116d5ea6ccbbcfc3008d04b *man/predict_transitions.Rd
f330bfb0bf13be4aea36ac587f1d7868 *src/Makevars
dafd74bc0ab6201ca5841bf709777eb4 *src/RcppExports.cpp
7f3211520255214525d5f3b6031fe81d *src/des.cpp
4f41451269f1eb10e8cf4589745c3b14 *src/event.cpp
d9fe25cf905c2e202d85e1aeb727cfa1 *src/event.h
437adecc034a16fe7ab7735343e89a27 *src/simulation.cpp
7ef2202601e0bb2fb4dd0a02a1523a83 *src/simulation.h
d80f9877a1a48538d8734223363b9845 *src/simulation.h
493d4d4ec65764b7e5f02d5ea8e6e124 *src/state.cpp
3b941394ca173084866651d88b048c39 *src/state.h
d3989e9b9945dffc0cca614a00812188 *src/transitions.cpp
Expand All @@ -38,7 +38,7 @@ d3989e9b9945dffc0cca614a00812188 *src/transitions.cpp
d6381e6929a139f71170c5202ad5cfdf *tests/testthat/test_lengthofstay.R
deb2f87b0b3b6fc268f091f9720ec019 *tests/testthat/test_msprep2.R
e080ddbcb09e99211ed92e745b4e110b *tests/testthat/test_transitionprobs.R
c2bd43e35bae9820cfb0df47dbc5b8ff *tests/testthat/test_utils.R
ea34a638211d96839c82dabcd21af542 *tests/testthat/test_utils.R
c28411b84a26af651d53480d3a39082b *vignettes/Examples.Rmd
dced1ef2ff01ec54d457df7ede8e6cda *vignettes/state_pathway.png
73731be9e5634faf2854c0a8d1f3eb94 *vignettes/treatmentpathways.png
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# multistateutils 1.2.4

Bug fixes. Tests for object class now use `inherits` and clock is now `double` to allow for greater range of values.

# multistateutils 1.2.3

- Added class `msdata` to the output from `msprep2` so that it is compatible with other `mstate` functions, such as `events`.
Expand Down
8 changes: 4 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
# being a list itself, containing 2 items. The first item is the (zero-based) indices in
# attrs of the model coefficients, and the second contains the coefficients themselves.
obtain_model_coef <- function(mod, attrs, M=1) {
if (class(mod) == 'oldage') {
if (inherits(mod, 'oldage')) {
list(name='oldage',
coefs=list(list(which(colnames(attrs) == mod$col)-1,
mod$scale),
list(0,
mod$limit
)))

} else if (class(mod) == 'flexsurvreg') {
} else if (inherits(mod, 'flexsurvreg')) {
dist <- mod$dlist$name
dist <- gsub("\\.[a-zA-Z]+", "", dist)
attr_names <- colnames(attrs)
Expand Down Expand Up @@ -132,7 +132,7 @@ get_state_entries <- function(x) {
}

get_sink_states <- function(tmat) {
if (class(tmat) != 'matrix')
if (!inherits(tmat, 'matrix'))
stop("Error: must provide a square transition matrix.")
if (ncol(tmat) != nrow(tmat))
stop("Error: must provide a square transition matrix.")
Expand Down Expand Up @@ -224,7 +224,7 @@ obtain_individual_starting_states <- function(trans_mat, ninds, nreps) {

# Obtains covariates that are used by these models
get_covariates <- function(models) {
if (!"list" %in% class(models))
if (!inherits(models, "list"))
stop("Error: must provide a list of flexsurvreg objects.")

if (!all(sapply(models, class) %in% c('flexsurvreg', 'oldage')))
Expand Down

0 comments on commit 6b59ffb

Please sign in to comment.