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" + ) + } }