From 537a4c7955ca204a6b11935402157cad25e3a7b1 Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:49:50 +0100 Subject: [PATCH] use examplesIf for suggested packages --- R/g_boxplot.R | 2 +- R/g_correlationplot.R | 2 +- R/g_lineplot.R | 2 +- man/g_boxplot.Rd | 2 ++ man/g_correlationplot.Rd | 2 ++ man/g_lineplot.Rd | 2 ++ 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/R/g_boxplot.R b/R/g_boxplot.R index c1e3739b..c315cd12 100755 --- a/R/g_boxplot.R +++ b/R/g_boxplot.R @@ -49,7 +49,7 @@ #' #' @export #' -#' @examples +#' @examplesIf require("nestcolor") #' # Example using ADaM structure analysis dataset. #' #' library(nestcolor) diff --git a/R/g_correlationplot.R b/R/g_correlationplot.R index 8c2bb8b5..97d093db 100644 --- a/R/g_correlationplot.R +++ b/R/g_correlationplot.R @@ -58,7 +58,7 @@ #' #' @export #' -#' @examples +#' @examplesIf require("tidyr") #' # Example using ADaM structure analysis dataset. #' #' library(stringr) diff --git a/R/g_lineplot.R b/R/g_lineplot.R index 7643a7f8..e2f77836 100644 --- a/R/g_lineplot.R +++ b/R/g_lineplot.R @@ -51,7 +51,7 @@ #' #' @export #' -#' @examples +#' @examplesIf require("nestcolor") #' # Example using ADaM structure analysis dataset. #' #' library(stringr) diff --git a/man/g_boxplot.Rd b/man/g_boxplot.Rd index c95543d4..548af0b1 100644 --- a/man/g_boxplot.Rd +++ b/man/g_boxplot.Rd @@ -104,6 +104,7 @@ to visually estimate various L-estimators, notably the interquartile range, midhinge, range, mid-range, and trimean. } \examples{ +\dontshow{if (require("nestcolor")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # Example using ADaM structure analysis dataset. library(nestcolor) @@ -173,6 +174,7 @@ g_boxplot(ADLB, hline_vars_colors = c("pink", "brown", "purple", "gray"), hline_vars_labels = c("A", "B", "C", "D") ) +\dontshow{\}) # examplesIf} } \author{ Balazs Toth diff --git a/man/g_correlationplot.Rd b/man/g_correlationplot.Rd index 7302e32a..d9e982be 100644 --- a/man/g_correlationplot.Rd +++ b/man/g_correlationplot.Rd @@ -147,6 +147,7 @@ symbol attributed \code{LOQ} values. Regression uses \code{deming} model. } \examples{ +\dontshow{if (require("tidyr")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # Example using ADaM structure analysis dataset. library(stringr) @@ -294,6 +295,7 @@ g_correlationplot( dot_size = 2, reg_text_size = 3 ) +\dontshow{\}) # examplesIf} } \author{ Nick Paszty (npaszty) paszty.nicholas@gene.com diff --git a/man/g_lineplot.Rd b/man/g_lineplot.Rd index 49801cdb..3269e23d 100644 --- a/man/g_lineplot.Rd +++ b/man/g_lineplot.Rd @@ -120,6 +120,7 @@ error bar denotes quartile. } \examples{ +\dontshow{if (require("nestcolor")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # Example using ADaM structure analysis dataset. library(stringr) @@ -300,6 +301,7 @@ g_lineplot( plot_height = 1500, dot_size = 4 ) +\dontshow{\}) # examplesIf} } \author{ Balazs Toth (toth.balazs@gene.com)