Skip to content

Commit fbd58a1

Browse files
authored
Merge pull request #245 from Merck/no-suggests
Run code conditionally to pass `noSuggests` check
2 parents d901750 + d13212f commit fbd58a1

36 files changed

Lines changed: 123 additions & 18 deletions

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: simtrial
22
Type: Package
33
Title: Clinical Trial Simulation
4-
Version: 0.4.0
4+
Version: 0.4.1
55
Authors@R: c(
66
person("Keaven", "Anderson", email = "keaven_anderson@merck.com", role = c("aut")),
77
person("Yujie", "Zhao", email = "yujie.zhao@merck.com", role = c("ctb","cre")),
@@ -44,6 +44,7 @@ Imports:
4444
future,
4545
methods,
4646
mvtnorm,
47+
rlang,
4748
stats,
4849
survival,
4950
utils

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ importFrom(future,plan)
4242
importFrom(methods,is)
4343
importFrom(mvtnorm,GenzBretz)
4444
importFrom(mvtnorm,pmvnorm)
45+
importFrom(rlang,is_installed)
4546
importFrom(survival,Surv)
4647
importFrom(survival,is.Surv)
4748
importFrom(survival,survfit)

NEWS.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# simtrial 0.4.1
2+
3+
## Improvements
4+
5+
- Pass `noSuggests` checks by running code examples, tests, and vignettes
6+
conditionally if the `Suggests` dependencies are not installed (#243).
7+
18
# simtrial 0.4.0
29

310
## New features
@@ -56,8 +63,7 @@ performance substantially, and adds new features and documentation.
5663
- Complete overhaul of the API. Function and argument names now use
5764
snake case for consistency and readability. See the
5865
[function reference](https://merck.github.io/simtrial/reference/)
59-
for the updated naming scheme. Detailed change history is available in the
60-
[merged pull requests](https://github.com/Merck/simtrial/pulls?q=is%3Apr+is%3Aclosed)
66+
for the updated naming scheme. Detailed change history is available in the merged pull requests
6167
(thanks, @LittleBeannie, @lili-ling-msd, and @XintongLi2023).
6268
- Dataset names updated to snake case (thanks, @nanxstats, #164).
6369
- The base pipe operator is now used throughout the package.

R/get_analysis_date.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@
6969
#'
7070
#' @export
7171
#'
72-
#' @examples
72+
#' @examplesIf rlang::is_installed("gsDesign2")
7373
#' library(gsDesign2)
74-
#' library(simtrial)
7574
#'
7675
#' alpha <- 0.025
7776
#' ratio <- 3

R/get_cut_date_by_event.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#'
3030
#' @export
3131
#'
32-
#' @examples
32+
#' @examplesIf rlang::is_installed("dplyr")
3333
#' library(dplyr)
3434
#'
3535
#' # Use default enrollment and calendar cut date

R/mb_delayed_effect.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#'
3939
#' @examples
4040
#' library(survival)
41-
#' library(dplyr)
4241
#'
4342
#' fit <- survfit(Surv(tte, event) ~ treatment, data = mb_delayed_effect)
4443
#'

R/randomize_by_fixed_block.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#'
3333
#' @export
3434
#'
35-
#' @examples
35+
#' @examplesIf rlang::is_installed("dplyr")
3636
#' library(dplyr)
3737
#'
3838
#' # Example 1

R/sim_fixed_n.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
#'
7474
#' @export
7575
#'
76-
#' @examples
76+
#' @examplesIf rlang::is_installed("dplyr")
7777
#' library(dplyr)
7878
#' library(future)
7979
#'

R/sim_gs_n.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#'
4343
#' @export
4444
#'
45-
#' @examples
45+
#' @examplesIf rlang::is_installed("gsDesign2")
4646
#' library(gsDesign2)
4747
#'
4848
#' # Parameters for enrollment

R/sim_pw_surv.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
#'
6161
#' @export
6262
#'
63-
#' @examples
63+
#' @examplesIf rlang::is_installed("dplyr")
6464
#' library(dplyr)
6565
#'
6666
#' # Example 1

0 commit comments

Comments
 (0)