diff --git a/R/palettes.R b/R/palettes.R index ffb5dd3..0ed25f5 100644 --- a/R/palettes.R +++ b/R/palettes.R @@ -13,14 +13,12 @@ #' @examples #' palette_lgbtq("bisexual") #' -#' \dontrun{ #' library(ggplot2) #' ggplot(data.frame(x = 1:10, y = 15:6, #' group = rep(c("a", "b"), each = 5)), #' aes(x = x, y = y, color = group)) + #' geom_point(size = 4) + #' scale_color_manual(values = palette_lgbtq("intersex")) -#' } #' #' @export palette_lgbtq <- function(name) { diff --git a/R/themes.R b/R/themes.R index 1df6cbe..c7cd97e 100644 --- a/R/themes.R +++ b/R/themes.R @@ -14,7 +14,6 @@ #' @return A ggplot2 `theme` object. #' #' @examples -#' \dontrun{ #' library(ggplot2) #' ggplot(data.frame(x = 1:10, y = 15:6, #' group = rep(c("a", "b"), each = 5)), @@ -23,7 +22,6 @@ #' scale_color_manual(values = palette_lgbtq("intersex")) + #' # Use the same name as for values, preferably #' theme_lgbtq("intersex") -#' } #' #' @importFrom ggplot2 theme element_rect element_line rel #' @export diff --git a/man/palette_lgbtq.Rd b/man/palette_lgbtq.Rd index 53cc058..a14568d 100644 --- a/man/palette_lgbtq.Rd +++ b/man/palette_lgbtq.Rd @@ -44,13 +44,11 @@ Currently available palettes are: \examples{ palette_lgbtq("bisexual") -\dontrun{ library(ggplot2) ggplot(data.frame(x = 1:10, y = 15:6, group = rep(c("a", "b"), each = 5)), aes(x = x, y = y, color = group)) + geom_point(size = 4) + scale_color_manual(values = palette_lgbtq("intersex")) -} } diff --git a/man/theme_lgbtq.Rd b/man/theme_lgbtq.Rd index 16d5b1f..73cc0e2 100644 --- a/man/theme_lgbtq.Rd +++ b/man/theme_lgbtq.Rd @@ -46,7 +46,6 @@ Currently available palettes are: } \examples{ -\dontrun{ library(ggplot2) ggplot(data.frame(x = 1:10, y = 15:6, group = rep(c("a", "b"), each = 5)), @@ -55,6 +54,5 @@ ggplot(data.frame(x = 1:10, y = 15:6, scale_color_manual(values = palette_lgbtq("intersex")) + # Use the same name as for values, preferably theme_lgbtq("intersex") -} }