From 53a8cfa95766ce35b45a50eef6575c1ff12c59cc Mon Sep 17 00:00:00 2001 From: pvictor Date: Tue, 26 Nov 2019 10:34:01 +0100 Subject: [PATCH] call to library(scales) --- R/apex-utils.R | 3 ++- man/ax_colors.Rd | 3 ++- vignettes/starting-with-apexcharts.Rmd | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/R/apex-utils.R b/R/apex-utils.R index 61cf871..4a4c8bd 100644 --- a/R/apex-utils.R +++ b/R/apex-utils.R @@ -280,11 +280,12 @@ ax_plotOptions <- function(ax, #' ax_colors("#F7D358") #' #' +#' library(scales) #' apex( #' data = count(diamonds, cut, color), #' mapping = aes(x = cut, y = n, fill = color) #' ) %>% -#' ax_colors(scales::brewer_pal(palette = "Set2")(7)) +#' ax_colors(brewer_pal(palette = "Set2")(7)) ax_colors <- function(ax, ...) { args <- list(...) if (length(args) == 1) { diff --git a/man/ax_colors.Rd b/man/ax_colors.Rd index 8bcaa1a..620bba8 100644 --- a/man/ax_colors.Rd +++ b/man/ax_colors.Rd @@ -33,9 +33,10 @@ apex( ax_colors("#F7D358") +library(scales) apex( data = count(diamonds, cut, color), mapping = aes(x = cut, y = n, fill = color) ) \%>\% - ax_colors(scales::brewer_pal(palette = "Set2")(7)) + ax_colors(brewer_pal(palette = "Set2")(7)) } diff --git a/vignettes/starting-with-apexcharts.Rmd b/vignettes/starting-with-apexcharts.Rmd index 4981a88..0bef8d4 100644 --- a/vignettes/starting-with-apexcharts.Rmd +++ b/vignettes/starting-with-apexcharts.Rmd @@ -23,6 +23,7 @@ Data used are from `ggplot2` package, data manipulation will be done with the `d ```{r message=FALSE, warning=FALSE} library(ggplot2) +library(scales) library(dplyr) library(apexcharter) ```