From 6788523ad2d7f749771d2d290c64dfb05b533984 Mon Sep 17 00:00:00 2001 From: Francesco Grossetti Date: Sat, 10 Apr 2021 18:38:40 +0200 Subject: [PATCH] About to send it to CRAN. Now the vignette is rendered correctly. --- DESCRIPTION | 4 +-- NEWS.md | 12 ++++++++- README.md | 2 +- cran-comments.md | 57 +++++++++++++++++++++++++++++------------- vignettes/msmtools.Rmd | 18 ++++++------- 5 files changed, 62 insertions(+), 31 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index bdaa890..4d44135 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: msmtools Type: Package Title: Building Augmented Data to Run Multi-State Models with 'msm' Package -Version: 2.0.0 -Date: 2021-04-07 +Version: 2.0.1 +Date: 2021-04-10 Authors@R: person("Francesco", "Grossetti", email = "francesco.grossetti@unibocconi.it", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-5130-7745")) diff --git a/NEWS.md b/NEWS.md index c534308..aa6f99b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,14 @@ -# msmtools 2.0.0 (development version) +# msmtools 2.0.1 +*** + +This is a maintenance update. There are no major updates worth of notice besides few tweaks in +the vignette which was not rendered appropriately. + +### Minor changes + +* Fixed few issues in the vignette where plots were not rendered nicely. + +# msmtools 2.0.0 *** **msmtools** sees several updates which come with potential breaking changes due to the dropping diff --git a/README.md b/README.md index e82b845..3ae7273 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Building augmented data for multi-state models: the `msmtools` package [![lifecycle](https://lifecycle.r-lib.org/articles/figures/lifecycle-maturing.svg)](https://lifecycle.r-lib.org/articles/stages.html) -[![release](https://img.shields.io/badge/dev.%20version-2.0.0-blue)](https://github.com/contefranz/msmtools) +[![release](https://img.shields.io/badge/dev.%20version-2.0.1-blue)](https://github.com/contefranz/msmtools) [![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/msmtools)](https://cran.r-project.org/package=msmtools) *** diff --git a/cran-comments.md b/cran-comments.md index eb24252..c33b299 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,22 +1,45 @@ +# msmtools 2.0.1 + +### Release summary + +This is a maintenance update. There are no major updates worth of notice besides few tweaks in +the vignette which was not rendered appropriately. + +### Package development + +* macOS 10.15.7 with R 4.0.4 + +### R CMD build + +* local MacOS 10.15.7 +* win build created with `devtools::check_win_release()` +* multiplatform builds created with `devtools::check_rhub()` + +### R CMD check results + +* Everything looks amazing so far. + +*** + # msmtools 2.0.0 -## Release summary +### Release summary This marks a major redesign in how the package manages plots. It now uses **ggplot2**. Also, most of the cumbersome arguments related to devices and plot layering have been improved and substantially removed. The above changes are enough to declare that **msmtools** has now reached full maturity and thus justify the jump to version 2.0.0. -## Package development +### Package development * macOS 10.15.7 with R 4.0.4 -## R CMD build +### R CMD build * local MacOS * win build through devtools::build_win() -## R CMD check results +### R CMD check results * There were no ERRORs nor WARNINGs nor NOTEs. @@ -27,26 +50,24 @@ Though the file is correct. README. The former is included in the bibliography and the latter is due to a Github link. - *** - # msmtools 1.3 -## Release summary +### Release summary This is version 1.3 of **msmtools** -## Package development +### Package development * macOS 10.12.5 with R 3.4.0 -## R CMD build +### R CMD build * local macOS * win build through devtools::build_win() -## R CMD check results +### R CMD check results * There were no ERRORs nor WARNINGs nor NOTEs. @@ -61,20 +82,20 @@ a Github link. *** # msmtools 1.2 -## Release summary +### Release summary This is version 1.2 of **msmtools** -## Package development +### Package development * OS X 10.11.5 with R 3.3.0 -## R CMD build +### R CMD build * local OS X * win build through devtools::build_win() -## R CMD check results +### R CMD check results There were no ERRORs or WARNINGs. @@ -86,20 +107,20 @@ This is due to the presence of a GitHub link which points at the file NEWS.md. *** # msmtools 1.1 -## Release summary +### Release summary This is version 1.1 of **msmtools** -## Package development +### Package development * OS X 10.11.4 with R 3.2.4 -## R CMD build +### R CMD build * local OS X * win build through devtools::build_win() -## R CMD check results +### R CMD check results There were no ERRORs or WARNINGs. diff --git a/vignettes/msmtools.Rmd b/vignettes/msmtools.Rmd index 1735e80..0256580 100644 --- a/vignettes/msmtools.Rmd +++ b/vignettes/msmtools.Rmd @@ -320,7 +320,7 @@ msm_model = msm( status_num ~ augmented_int, To run a comparison between the estimated and the empirical survival curves, we run the following simple code: -```{r survplot_1, fig.align = 'center', fig.width = 5, fig.height = 4} +```{r survplot_1, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE} gof1 = survplot( x = msm_model, km = TRUE ) ``` @@ -337,7 +337,7 @@ If `to` is missing, `survplot()` checks what is the higher value in the corresponding `msm` object and grabs it. Let's now plot the survival comparison for the transition (OUT - DEAD): -```{r survplot_2, fig.align = 'center', fig.width = 5, fig.height = 4} +```{r survplot_2, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE} gof2 = survplot( x = msm_model, km = TRUE, from = 2 ) ``` @@ -353,7 +353,7 @@ explicitly pass a custom time sequence. This can be achieved by passing to the a Consider our dataset and suppose we want to compute an estimated survival only for specific points in time. The following code addresses this request. -```{r custom_time_seq, fig.align = 'center', fig.width = 5, fig.height = 4} +```{r custom_time_seq, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE} time_seq = seq( 300, 800, by = 30 ) custom_time = survplot( x = msm_model, times = time_seq ) ``` @@ -369,7 +369,7 @@ Kaplan-Meier curve is returned. The code below shows how this works. -```{r returnKM, collapse = TRUE, fig.align = 'center', fig.width = 5, fig.height = 4} +```{r returnKM, collapse = TRUE, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE} km_out = survplot( x = msm_model, km = TRUE, out = "km") ``` @@ -405,7 +405,7 @@ used to compute the estimated survival as well. This can be achieve by setting as many rows as the elements in `times`. If `times` is missing, then `survplot()` uses `grid` to know how many time points are requested. An example is shown in the next snippet. -```{r returnP, collapse = TRUE} +```{r returnP, collapse = TRUE, fig.align='center', fig.width=7, fig.height=6, fig.fullwidth = TRUE} fitted = survplot( x = msm_model, grid = 10, out = "fitted" ) ``` @@ -430,7 +430,7 @@ Of course, you can request `survplot()` to return both the datasets by specifyin In this case, a named list with three elements is returned. The mechanism to access the elements is the same described above. The snippet below reports an example. -```{r return_all, collapse = TRUE, fig.align = 'center', fig.width = 5, fig.height = 4} +```{r return_all, collapse = TRUE, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE} # just running survplot() out_all = survplot( x = msm_model, km = TRUE, out = "all") ``` @@ -446,7 +446,7 @@ prevalences using `prevalence.msm()` function. This produces a named list which will be used inside `prevplot()`. For instance, running the following code builds a plot of prevalences for each state of the model. -```{r prev, collapse = TRUE, fig.align = 'center', fig.width = 7, fig.height = 3} +```{r prev, collapse = TRUE, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE} # defining the times at which compute the prevalences t_min = min( hosp_augmented$augmented_int ) t_max = max( hosp_augmented$augmented_int ) @@ -468,10 +468,10 @@ It is also possible to plot the following statistic: $$ M = \frac{(O_{is} - E_{is})^2} {E_{is}} $$ -which gives an idea of the deviance from the Markov model. This is computed +This gives an idea of the deviance from the Markov model and is computed according to Titman and Sharples (2008). The following code addresses this request. -```{r plot_M, collapse = TRUE, fig.align = 'center', fig.width = 7, fig.height = 3, warning = F} +```{r plot_M, collapse = TRUE, fig.align = 'center', fig.width=7, fig.height=9, fig.fullwidth = TRUE, warning = F} gof = prevplot( x = msm_model, prev.obj = prev, exacttimes = TRUE, M = TRUE, ci = TRUE ) ```