Skip to content

Commit

Permalink
version 1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
stulacy authored and cran-robot committed Nov 7, 2019
1 parent 77f8f11 commit 49b88e7
Show file tree
Hide file tree
Showing 9 changed files with 666 additions and 641 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Package: multistateutils
Type: Package
Title: Utility Functions for Parametric Multi-State Models
Version: 1.2.2
Date: 2019-02-03
Version: 1.2.3
Date: 2019-11-07
Author: Stuart Lacy
Maintainer: Stuart Lacy <stuart.lacy@gmail.com>
Description: Provides functions for working with multi-state modelling,
such as efficient simulation routines for estimating transition probabilities and length of stay.
It is designed as an extension to multi-state modelling capabilities provided with the 'flexsurv'
package (see Jackson (2016) <doi:10.18637/jss.v070.i08>).
License: GPL (>= 3)
Imports: data.table, dplyr, magrittr, networkD3, tidyr, webshot
Imports: data.table, dplyr, magrittr, networkD3, tidyr
Suggests: covr, knitr, flexsurv, mstate, microbenchmark, rmarkdown,
testthat
URL: https://github.com/stulacy/multistateutils
Expand All @@ -19,6 +19,6 @@ LinkingTo: Rcpp
RoxygenNote: 6.1.1
VignetteBuilder: knitr
NeedsCompilation: yes
Packaged: 2019-02-03 22:34:45 UTC; stuart
Packaged: 2019-11-07 21:17:12 UTC; stuart
Repository: CRAN
Date/Publication: 2019-02-04 08:30:11 UTC
Date/Publication: 2019-11-07 22:50:02 UTC
16 changes: 8 additions & 8 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
e6f30b513bb0a362d91fbdd6a7f1c4e6 *DESCRIPTION
6cfa156e03e842a8b84f0783a1cf4da7 *DESCRIPTION
a1ae93d2c87fcc5f98452956facfdedf *NAMESPACE
ad0555e1573e283fb9a54d398bac1870 *NEWS.md
79233a95319564d327ca10c567659416 *NEWS.md
0a91d61ac2ba351a6ca6a640bea450a8 *R/RcppExports.R
b1dbcdf5b70b84232533a3cfe8cf0ec2 *R/cohort.R
5795f711de63e297c77b4b61e5d1fcc7 *R/length_of_stay.R
3a50addd2e64e90239e5d1e6eebfec87 *R/msprep2.R
a18d5847d5ed8bd5a65dbf2651b2ca79 *R/msprep2.R
ac7e40966b058f5596304f9b7e3516ca *R/multistateutils.R
1f182e54f53c05a90a759b5e3c3e599a *R/run_simulation.R
aa5c6bd41802ac1354513df6612de673 *R/statepathways.R
438b1342adbd6fc74092e2dd0b8d0499 *R/transition_probabilities.R
ef88f74fe85ac74eec6bd37ddb2116b2 *R/utils.R
725ec67436f98afd433693db94193e00 *README.md
d41d8cd98f00b204e9800998ecf8427e *TODO
2f05c1bf3d22113ebb6c9fcf010bb011 *build/vignette.rds
d76ab1ddde1f2984861068978adfbd99 *build/vignette.rds
26f953065122cd33ff110e10fdecf17b *inst/doc/Examples.R
c28411b84a26af651d53480d3a39082b *inst/doc/Examples.Rmd
8a615a4fd2ebfa52236d77aa5c18fc18 *inst/doc/Examples.html
68f84f52a3e8470de3de8aa6b3ff691f *inst/doc/Examples.html
6b3f2cc5910bce7dfe286c5e106ddebb *man/cohort_simulation.Rd
7db3576cf60e4e65a16117f021608430 *man/length_of_stay.Rd
1ff74eeb09e7d3d6d1713dd83e3af696 *man/msprep2.Rd
8b4c29799f2a385cafd351c601e8b0b3 *man/msprep2.Rd
9e0ca400531a052050b92d9af7090f71 *man/multistateutils.Rd
a5727825046d69ecd638dfc32e12ec8b *man/plot_predicted_pathway.Rd
27b90cf9061911ba15390514271257d4 *man/predict_transitions.Rd
e3d3cb360fbfdb3c6974e14eb5f09870 *src/Makevars
f330bfb0bf13be4aea36ac587f1d7868 *src/Makevars
dafd74bc0ab6201ca5841bf709777eb4 *src/RcppExports.cpp
7f3211520255214525d5f3b6031fe81d *src/des.cpp
4f41451269f1eb10e8cf4589745c3b14 *src/event.cpp
d9fe25cf905c2e202d85e1aeb727cfa1 *src/event.h
437adecc034a16fe7ab7735343e89a27 *src/simulation.cpp
b06773afbb4393b539af4ccff2a68535 *src/simulation.h
7ef2202601e0bb2fb4dd0a02a1523a83 *src/simulation.h
493d4d4ec65764b7e5f02d5ea8e6e124 *src/state.cpp
3b941394ca173084866651d88b048c39 *src/state.h
d3989e9b9945dffc0cca614a00812188 *src/transitions.cpp
Expand Down
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.3

- Added class `msdata` to the output from `msprep2` so that it is compatible with other `mstate` functions, such as `events`.

# multistateutils 1.2.2

- Fix for changes in data.table 1.12.1
Expand Down
7 changes: 6 additions & 1 deletion R/msprep2.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#' @param idcol The column that indexes these patients, must be present in
#' \code{entry} and \code{censors}, \code{start_times}, \code{start_states},
#' and \code{covars} if supplied.
#' @return An object of class \code{msdata}, representing the transition data
#' in long format.
#' @examples
#' library(multistateutils)
#' library(mstate)
Expand Down Expand Up @@ -241,6 +243,9 @@ msprep2 <- function(entry, tmat, censors=NULL,
to_int <- c('id', 'from', 'to', 'trans', 'status')
entry4[to_int] <- lapply(entry4[to_int], as.integer)

entry4 %>%
out <- entry4 %>%
dplyr::arrange(id, Tstart, trans)
attr(out, "trans") <- tmat
class(out) <- c('msdata', class(out))
out
}
Binary file modified build/vignette.rds
Binary file not shown.
1,260 changes: 635 additions & 625 deletions inst/doc/Examples.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions man/msprep2.Rd

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

4 changes: 3 additions & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
CXX_STD = CXX11
CXX=clang++
CC=clang
CXX_STD=CXX11
2 changes: 1 addition & 1 deletion src/simulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Simulation {
double get_sim_entry_time(int);
double get_previous_state_entry_time(int);
void run();
unsigned int clock;
unsigned long clock;
State* get_state(int);
double get_next_event_time();
Rcpp::NumericVector get_patient_attrs(int);
Expand Down

0 comments on commit 49b88e7

Please sign in to comment.