From e8111a33a6e9eedb1ad4afb3dd07a62a84d9409c Mon Sep 17 00:00:00 2001 From: pvictor Date: Mon, 28 Oct 2024 09:26:44 +0100 Subject: [PATCH] removed interactive() in example --- R/layers.R | 11 +++++++++++ examples/v_wordcloud.R | 10 ---------- man/v_wordcloud.Rd | 16 ++++++++-------- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/R/layers.R b/R/layers.R index 25f38f6..2346857 100644 --- a/R/layers.R +++ b/R/layers.R @@ -994,6 +994,17 @@ v_heatmap <- function(vc, #' @export #' #' @example examples/v_wordcloud.R +#' @examples +#' \donttest{ +#' +#' # Use an image to shape the wordcloud +#' vchart(top_cran_downloads) %>% +#' v_wordcloud( +#' aes(word = package, count = count, color = package), +#' maskShape = "https://jeroen.github.io/images/Rlogo.png" +#' ) +#' +#' } v_wordcloud <- function(vc, mapping = NULL, data = NULL, diff --git a/examples/v_wordcloud.R b/examples/v_wordcloud.R index 2228e1f..796ce40 100644 --- a/examples/v_wordcloud.R +++ b/examples/v_wordcloud.R @@ -17,13 +17,3 @@ vchart(top_cran_downloads) %>% ) ) ) - - -if (interactive()) { - # Use an image to shape the wordcloud - vchart(top_cran_downloads) %>% - v_wordcloud( - aes(word = package, count = count, color = package), - maskShape = "https://jeroen.github.io/images/Rlogo.png" - ) -} diff --git a/man/v_wordcloud.Rd b/man/v_wordcloud.Rd index 3ce7ce3..e517d7f 100644 --- a/man/v_wordcloud.Rd +++ b/man/v_wordcloud.Rd @@ -54,14 +54,14 @@ vchart(top_cran_downloads) \%>\% ) ) ) +\donttest{ - -if (interactive()) { - # Use an image to shape the wordcloud - vchart(top_cran_downloads) \%>\% - v_wordcloud( - aes(word = package, count = count, color = package), - maskShape = "https://jeroen.github.io/images/Rlogo.png" - ) +# Use an image to shape the wordcloud +vchart(top_cran_downloads) \%>\% + v_wordcloud( + aes(word = package, count = count, color = package), + maskShape = "https://jeroen.github.io/images/Rlogo.png" + ) + } }