Skip to content

Commit

Permalink
Silence example failures on old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Apr 30, 2024
1 parent 1cf0435 commit 4655db2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
26 changes: 12 additions & 14 deletions R/element_marquee.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,25 @@
#'
#' @export
#'
#' @examples
#' if (rlang::is_installed("ggplot2")) {
#' library(ggplot2)
#' p <- ggplot(mtcars) +
#' geom_point(aes(mpg, disp)) +
#' labs(title = "A {.red *marquee*} title\n* Look at this bullet list\n\n* great, huh?") +
#' theme_gray(base_size = 6) +
#' theme(title = element_marquee())
#' @examplesIf utils::packageVersion("base") > "4.3" && rlang::is_installed("ggplot2")
#' library(ggplot2)
#' p <- ggplot(mtcars) +
#' geom_point(aes(mpg, disp)) +
#' labs(title = "A {.red *marquee*} title\n* Look at this bullet list\n\n* great, huh?") +
#' theme_gray(base_size = 6) +
#' theme(title = element_marquee())
#'
#' plot(p)
#' plot(p)
#'
#' ggplot(mtcars) +
#' geom_histogram(aes(x = mpg)) +
#' labs(title =
#' ggplot(mtcars) +
#' geom_histogram(aes(x = mpg)) +
#' labs(title =
#' "I put a plot in your title so you can plot while you title
#'
#' ![](p)
#'
#' What more could you _possibly_ want?") +
#' theme(title = element_marquee())
#' }
#' theme(title = element_marquee())
#'
element_marquee <- function(family = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = NULL, angle = NULL, lineheight = NULL,
Expand Down
3 changes: 2 additions & 1 deletion R/geom_marquee.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
#'
#' @export
#'
#' @examples
#' @examplesIf utils::packageVersion("base") > "4.3" && rlang::is_installed("ggplot2")
#'
#' library(ggplot2)
#' # Standard use
#' p <- ggplot(mtcars, aes(wt, mpg))
Expand Down
27 changes: 13 additions & 14 deletions man/element_marquee.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/geom_marquee.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4655db2

Please sign in to comment.