Skip to content

Commit 5ad1da6

Browse files
authored
Merge pull request #12 from Merck/Nextrel
Update package installations at top of vignettes
2 parents 45a0464 + 64d3ef4 commit 5ad1da6

File tree

6 files changed

+54
-20
lines changed

6 files changed

+54
-20
lines changed

DESCRIPTION

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: psm3mkv
22
Title: Fit and Evaluate Three-State Partitioned Survival Analysis and Markov Models to Progression-Free and Overall Survival Data
3-
Version: 0.2.0
3+
Version: 0.2.0.9000
44
Authors@R: c(
55
person("Dominic", "Muston", , "[email protected]", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-4876-7940")),
@@ -22,6 +22,7 @@ Imports:
2222
flexsurv,
2323
ggplot2,
2424
purrr,
25+
remotes,
2526
rlang,
2627
SimplicialCubature,
2728
stats,

NEWS.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# psm3mkv (development version)
2+
13
# 26 Jan 2024 - Version 0.2
24

35
This version provides additional functionality to the calculation of restricted mean durations in `calc_allrmds`. These estimates may now be constrained by a lifetable (see `calc_ltsurv`) and discounting may now be applied. A vignette describing how to use this functionality is provided: `vignette("background-mortality")`.

README.Rmd

+4-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ The package requires version 4.1 of R (due to use of the [native pipe](https://w
8080
The development version of *psm3mkv* may be downloaded as follows:
8181

8282
``` r
83-
# Install from Github as follows (with the vignette)
84-
remotes::install_github("Merck/psm3mkv", build_vignettes=TRUE)
83+
# Install version 0.2 from Github as follows, with the vignette
84+
remotes::install_github("Merck/psm3mkv",
85+
ref="v0.2",
86+
build_vignettes=TRUE)
8587
```
8688

8789
## Licensing

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ ensure R is updated first.
9494
The development version of *psm3mkv* may be downloaded as follows:
9595

9696
``` r
97-
# Install from Github as follows (with the vignette)
98-
remotes::install_github("Merck/psm3mkv", build_vignettes=TRUE)
97+
# Install version 0.2 from Github as follows, with the vignette
98+
remotes::install_github("Merck/psm3mkv",
99+
ref="v0.2",
100+
build_vignettes=TRUE)
99101
```
100102

101103
## Licensing

vignettes/background-mortality.Rmd

+20-5
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,28 @@ The calculation of restricted mean durations in *psm3mkv* default to assume no l
122122

123123
### Initializing
124124

125-
First we load the packages we need - all of which are suggested for or imported to *psm3mkv*.
125+
First we load the packages we need - all of which are suggested for or imported to *psm3mkv*. With thanks again to @vbaliga for [this helpful code](https://vbaliga.github.io/posts/2019-04-28-verify-that-r-packages-are-installed-and-loaded/)).
126126

127127
```{r packages, message=FALSE}
128-
library(psm3mkv) # Load psm3mkv itself
129-
library(dplyr) # for data wrangling
130-
library(flexsurv) # for the datasets attached
131-
library(HMDHFDplus) # to create lifetables from the Human Mortality Database
128+
# Install psm3mkv version 0.2 from github
129+
require("remotes")
130+
remotes::install_github("Merck/psm3mkv",
131+
ref="v0.2",
132+
build_vignettes=TRUE)
133+
134+
# First specify the packages of interest
135+
packages = c("psm3mkv", "dplyr", "flexsurv", "HMDHFDplus", "remotes")
136+
137+
# Now load or install & load all
138+
package.check <- lapply(
139+
packages,
140+
FUN = function(x) {
141+
if (!require(x, character.only = TRUE)) {
142+
install.packages(x, dependencies = TRUE)
143+
library(x, character.only = TRUE)
144+
}
145+
}
146+
)
132147
```
133148

134149
### Creating the life table

vignettes/example.Rmd

+22-10
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,30 @@ knitr::opts_chunk$set(
1616

1717
## Introduction
1818

19-
This vignette walks through evaluating the partitioned survival model (PSM) and state transition model structures (either clock reset, STM-CR, or clock forward types, STM-CF) to a dataset derived from the *bosms3* dataset that comes with the *flexsurv* package.[1] A review of PSMs and STMs in oncology cost-effectiveness models is provided by Woods et al.[2]
19+
This vignette walks through evaluating the partitioned survival model (PSM) and state transition model structures (either clock reset, STM-CR, or clock forward types, STM-CF) to a dataset derived from the *bosms3* dataset that comes with the [flexsurv::flexsurv-package()].[1] A review of PSMs and STMs in oncology cost-effectiveness models is provided by Woods et al.[2]
20+
21+
First we need to install and load the packages of interest (with thanks to @vbaliga for [this helpful code](https://vbaliga.github.io/posts/2019-04-28-verify-that-r-packages-are-installed-and-loaded/)).
2022

2123
```{r packages, message=FALSE}
22-
# Load psm3mkv itself
23-
library(psm3mkv)
24-
25-
# Other packages
26-
library(dplyr) # for data wrangling
27-
library(boot) # for bootstrapping
28-
library(ggsci) # for nice graphics
29-
library(flexsurv) # for data to work
30-
library(survival) # for data to work
24+
# Install psm3mkv version 0.2 from github
25+
require("remotes")
26+
remotes::install_github("Merck/psm3mkv",
27+
ref="v0.2",
28+
build_vignettes=TRUE)
29+
30+
# First specify the packages of interest
31+
packages = c("psm3mkv", "dplyr", "boot", "ggsci", "flexsurv", "survival")
32+
33+
# Now load or install & load all
34+
package.check <- lapply(
35+
packages,
36+
FUN = function(x) {
37+
if (!require(x, character.only = TRUE)) {
38+
install.packages(x, dependencies = TRUE)
39+
library(x, character.only = TRUE)
40+
}
41+
}
42+
)
3143
```
3244

3345
## Obtaining a suitable dataset

0 commit comments

Comments
 (0)