From 9eb97ddd9090246b2bb4a7789bb942707069f7ee Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Sat, 26 Oct 2024 06:17:09 +0800 Subject: [PATCH] import nestcolor (#1341) # Pull Request Fixes #nnn --------- Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com> --- NAMESPACE | 1 + R/g_forest.R | 1 - R/g_ipp.R | 2 -- R/g_km.R | 1 - R/g_lineplot.R | 1 - R/g_step.R | 1 - R/g_waterfall.R | 1 - R/package.R | 1 + man/g_forest.Rd | 1 - man/g_ipp.Rd | 1 - man/g_km.Rd | 1 - man/g_lineplot.Rd | 1 - man/g_step.Rd | 1 - man/g_waterfall.Rd | 1 - man/h_g_ipp.Rd | 1 - 15 files changed, 2 insertions(+), 14 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index e5fbc85f5c..a0c4f44e3c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -316,6 +316,7 @@ importFrom(grid,validDetails) importFrom(grid,widthDetails) importFrom(magrittr,"%>%") importFrom(methods,new) +importFrom(nestcolor,theme_nest) importFrom(rlang,.data) importFrom(stats,complete.cases) importFrom(stats,pchisq) diff --git a/R/g_forest.R b/R/g_forest.R index b1709ea88e..cd813d383e 100644 --- a/R/g_forest.R +++ b/R/g_forest.R @@ -53,7 +53,6 @@ #' @examples #' library(dplyr) #' library(forcats) -#' library(nestcolor) #' #' adrs <- tern_ex_adrs #' n_records <- 20 diff --git a/R/g_ipp.R b/R/g_ipp.R index bca9e9e063..80f45f5e38 100644 --- a/R/g_ipp.R +++ b/R/g_ipp.R @@ -47,7 +47,6 @@ NULL #' #' @examples #' library(dplyr) -#' library(nestcolor) #' #' # Select a small sample of data to plot. #' adlb <- tern_ex_adlb %>% @@ -155,7 +154,6 @@ h_g_ipp <- function(df, #' #' @examples #' library(dplyr) -#' library(nestcolor) #' #' # Select a small sample of data to plot. #' adlb <- tern_ex_adlb %>% diff --git a/R/g_km.R b/R/g_km.R index 01f4b641d2..3fab8a8ddf 100644 --- a/R/g_km.R +++ b/R/g_km.R @@ -93,7 +93,6 @@ #' #' @examples #' library(dplyr) -#' library(nestcolor) #' #' df <- tern_ex_adtte %>% #' filter(PARAMCD == "OS") %>% diff --git a/R/g_lineplot.R b/R/g_lineplot.R index 82589e18ed..3946896787 100644 --- a/R/g_lineplot.R +++ b/R/g_lineplot.R @@ -76,7 +76,6 @@ #' @return A `ggplot` line plot (and statistics table if applicable). #' #' @examples -#' library(nestcolor) #' #' adsl <- tern_ex_adsl #' adlb <- tern_ex_adlb %>% dplyr::filter(ANL01FL == "Y", PARAMCD == "ALT", AVISIT != "SCREENING") diff --git a/R/g_step.R b/R/g_step.R index 37f6aff3a3..9f89257c22 100644 --- a/R/g_step.R +++ b/R/g_step.R @@ -18,7 +18,6 @@ #' @seealso Custom tidy method [tidy.step()]. #' #' @examples -#' library(nestcolor) #' library(survival) #' lung$sex <- factor(lung$sex) #' diff --git a/R/g_waterfall.R b/R/g_waterfall.R index a4b7988de1..638c88e09b 100644 --- a/R/g_waterfall.R +++ b/R/g_waterfall.R @@ -17,7 +17,6 @@ #' #' @examples #' library(dplyr) -#' library(nestcolor) #' #' g_waterfall(height = c(3, 5, -1), id = letters[1:3]) #' diff --git a/R/package.R b/R/package.R index 9fc47540c7..4126403ad1 100644 --- a/R/package.R +++ b/R/package.R @@ -9,6 +9,7 @@ #' @importFrom formatters format_value propose_column_widths #' @importFrom magrittr %>% #' @importFrom methods new +#' @importFrom nestcolor theme_nest #' @importFrom Rdpack reprompt #' @importFrom rlang .data #' @importFrom survival coxph strata Surv diff --git a/man/g_forest.Rd b/man/g_forest.Rd index 7144dd2ba7..b085809b51 100644 --- a/man/g_forest.Rd +++ b/man/g_forest.Rd @@ -106,7 +106,6 @@ table and forest plot are printed side-by-side. \examples{ library(dplyr) library(forcats) -library(nestcolor) adrs <- tern_ex_adrs n_records <- 20 diff --git a/man/g_ipp.Rd b/man/g_ipp.Rd index 9ed7c0a88a..eaddf1c3af 100644 --- a/man/g_ipp.Rd +++ b/man/g_ipp.Rd @@ -77,7 +77,6 @@ values over time. }} \examples{ library(dplyr) -library(nestcolor) # Select a small sample of data to plot. adlb <- tern_ex_adlb \%>\% diff --git a/man/g_km.Rd b/man/g_km.Rd index 4d86335a02..c46349a96c 100644 --- a/man/g_km.Rd +++ b/man/g_km.Rd @@ -195,7 +195,6 @@ per group. } \examples{ library(dplyr) -library(nestcolor) df <- tern_ex_adtte \%>\% filter(PARAMCD == "OS") \%>\% diff --git a/man/g_lineplot.Rd b/man/g_lineplot.Rd index b5e88617bf..c3f9b35921 100644 --- a/man/g_lineplot.Rd +++ b/man/g_lineplot.Rd @@ -159,7 +159,6 @@ A \code{ggplot} line plot (and statistics table if applicable). Line plot with the optional table. } \examples{ -library(nestcolor) adsl <- tern_ex_adsl adlb <- tern_ex_adlb \%>\% dplyr::filter(ANL01FL == "Y", PARAMCD == "ALT", AVISIT != "SCREENING") diff --git a/man/g_step.Rd b/man/g_step.Rd index 7031aa2dad..4fdbdcd45f 100644 --- a/man/g_step.Rd +++ b/man/g_step.Rd @@ -35,7 +35,6 @@ Based on the STEP results, creates a \code{ggplot} graph showing the estimated H along the continuous biomarker value subgroups. } \examples{ -library(nestcolor) library(survival) lung$sex <- factor(lung$sex) diff --git a/man/g_waterfall.Rd b/man/g_waterfall.Rd index fb10b5d4f8..276d719e36 100644 --- a/man/g_waterfall.Rd +++ b/man/g_waterfall.Rd @@ -42,7 +42,6 @@ This basic waterfall plot visualizes a quantity \code{height} ordered by value w } \examples{ library(dplyr) -library(nestcolor) g_waterfall(height = c(3, 5, -1), id = letters[1:3]) diff --git a/man/h_g_ipp.Rd b/man/h_g_ipp.Rd index 5069793188..b1c6e75110 100644 --- a/man/h_g_ipp.Rd +++ b/man/h_g_ipp.Rd @@ -60,7 +60,6 @@ Function that generates a simple line plot displaying parameter trends over time } \examples{ library(dplyr) -library(nestcolor) # Select a small sample of data to plot. adlb <- tern_ex_adlb \%>\%