Skip to content

Commit 688c955

Browse files
author
ChristineStawitz-NOAA
committed
remove run from examples
1 parent 3165524 commit 688c955

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ Authors@R:
66
family = "Stawitz",
77
role = c("aut", "cre"),
88
email = "christine.stawitz@noaa.gov")
9-
Description: This is a package that implements a color palette in line with the NOAA Fisheries Branding Guide
9+
Description: This is a package that implements a color palette in line with the NOAA Fisheries Branding Guide.
1010
License: GPL-3
1111
Encoding: UTF-8
1212
LazyData: true
1313
Roxygen: list(markdown = TRUE)
1414
RoxygenNote: 7.1.1
15-
Imports: ggplot2
15+
Imports:
16+
ggplot2
1617
Suggests:
1718
testthat

R/nmfs_cols.R

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,13 @@ display_nmfs_palette <- function(name, n, ...) {
103103
#' @param ... Additional arguments passed to discrete_scale() or
104104
#' scale_color_gradientn(), used respectively when discrete is TRUE or FALSE
105105
#' @importFrom ggplot2 ggplot geom_point discrete_scale scale_color_gradientn aes
106-
#'@examples
107-
#' p <- ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
106+
#' @examples
107+
#' \dontrun{
108+
#' ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
108109
#' geom_point(size = 4) +
109110
#' scale_color_nmfs("coral")
110-
#'@export
111+
#' }
112+
#' @export
111113
scale_color_nmfs <- function(palette = "oceans", discrete = TRUE, reverse = FALSE, ...) {
112114
pal <- nmfs_palette(palette = palette, reverse = reverse)
113115

@@ -126,11 +128,13 @@ scale_color_nmfs <- function(palette = "oceans", discrete = TRUE, reverse = FALS
126128
#' @param ... Additional arguments passed to discrete_scale() or
127129
#' scale_fill_gradientn(), used respectively when discrete is TRUE or FALSE
128130
#' @importFrom ggplot2 ggplot geom_bar theme discrete_scale scale_fill_gradientn element_text
129-
#'@examples
130-
#' ggplot2::ggplot(mpg, aes(manufacturer, fill = manufacturer)) +
131+
#' @examples
132+
#' \dontrun{
133+
#' ggplot(mpg, aes(manufacturer, fill = manufacturer)) +
131134
#' geom_bar() +
132135
#' theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
133136
#' scale_fill_nmfs(palette = "crustacean", discrete=FALSE)
137+
#' }
134138
#'@export
135139
scale_fill_nmfs <- function(palette = "oceans", discrete = TRUE, reverse = FALSE, ...) {
136140
pal <- nmfs_palette(palette = palette, reverse = reverse)

man/scale_color_nmfs.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/scale_fill_nmfs.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)