From 68abd24a706a3a047a3f6b1aad4a2feeb76f2e7b Mon Sep 17 00:00:00 2001 From: Dominic Muston Date: Fri, 5 Jan 2024 20:02:23 -0500 Subject: [PATCH] Starting to fix R upgrade issues --- NAMESPACE | 1 + R/ppdpps.R | 4 ++-- R/probgraphs.R | 1 + vignettes/example.Rmd | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 0e0ad3d..f5e6fad 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -29,6 +29,7 @@ export(give_noparams) export(give_noparams_par) export(graph_psm_hazards) export(graph_psm_survs) +export(graph_survs) export(prob_os_psm) export(prob_os_stm_cf) export(prob_os_stm_cr) diff --git a/R/ppdpps.R b/R/ppdpps.R index 70450be..b98a107 100644 --- a/R/ppdpps.R +++ b/R/ppdpps.R @@ -167,7 +167,7 @@ pickout_psmhaz <- function(timepoint, endpoint, ptdata, dpam, psmtype) { # Run calculation of all hazards allhaz <- calc_haz_psm(timepoint, ptdata, dpam, type) # Required hazard, unadjusted - h_unadj <- case_when( + h_unadj <- dplyr::case_when( endpoint=="TTP" ~ allhaz$unadj$ttp, endpoint=="PPD" ~ allhaz$unadj$ppd, endpoint=="PFS" ~ allhaz$unadj$pfs, @@ -176,7 +176,7 @@ pickout_psmhaz <- function(timepoint, endpoint, ptdata, dpam, psmtype) { .default = NA ) # Required hazard, adjusted - h_adj <- case_when( + h_adj <- dplyr::case_when( endpoint=="TTP" ~ allhaz$adj$ttp, endpoint=="PPD" ~ allhaz$adj$ppd, endpoint=="PFS" ~ allhaz$adj$pfs, diff --git a/R/probgraphs.R b/R/probgraphs.R index d1b9338..68f9bad 100644 --- a/R/probgraphs.R +++ b/R/probgraphs.R @@ -419,6 +419,7 @@ prob_os_stm_cf <- function(time, dpam, starting=c(1, 0, 0)) { #' @param cuttime is the cut-off time for a two-piece model (default 0, indicating a one-piece model) #' @param tpoints indicates how many timepoints should be included in the graphics (default 100) #' @return Four datasets and graphics as a list +#' @export #' @importFrom rlang .data #' @examples #' bosonc <- create_dummydata("flexbosms") diff --git a/vignettes/example.Rmd b/vignettes/example.Rmd index 5c044ed..8c91df2 100644 --- a/vignettes/example.Rmd +++ b/vignettes/example.Rmd @@ -26,6 +26,8 @@ library(psm3mkv) library(dplyr) # for data wrangling library(boot) # for bootstrapping library(ggsci) # for nice graphics +library(flexsurv) # for data to work +library(survival) # for data to work ``` ## Obtaining a suitable dataset