Skip to content

Commit 5157c76

Browse files
committed
suggest scales; other R CMD check things
1 parent a0621c4 commit 5157c76

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ Suggests:
9393
shinytest,
9494
yaml,
9595
future,
96-
dygraphs
96+
dygraphs,
97+
scales
9798
Remotes:
9899
rstudio/htmltools
99100
URL: http://shiny.rstudio.com

R/render-plot.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ ggplot_build_with_theme <- function(p, theme, ggplot_build = ggplot2::ggplot_bui
633633
# TODO: update version depending on when these PRs are merged.
634634
# https://github.com/tidyverse/ggplot2/pull/3828
635635
# https://github.com/tidyverse/ggplot2/pull/3833
636-
if (packageVersion("ggplot2") > "3.3.1") {
636+
if (utils::packageVersion("ggplot2") > "3.3.1") {
637637
old_scales <- do.call(options, scale_defaults)
638638
on.exit({options(old_scales)}, add = TRUE)
639639
} else {
@@ -645,8 +645,8 @@ ggplot_build_with_theme <- function(p, theme, ggplot_build = ggplot2::ggplot_bui
645645
p$plot_env$scale_fill_continuous <- scale_defaults$ggplot2.continuous.fill
646646
}
647647
if (!identical(qual_codes, NA)) {
648-
p$plot_env$scale_colour_discrete <- function(...) discrete_scale("colour", "qualitative", qualitative_pal(qual_codes), ...)
649-
p$plot_env$scale_fill_discrete <- function(...) discrete_scale("fill", "qualitative", qualitative_pal(qual_codes), ...)
648+
p$plot_env$scale_colour_discrete <- function(...) ggplot2::discrete_scale("colour", "qualitative", qualitative_pal(qual_codes), ...)
649+
p$plot_env$scale_fill_discrete <- function(...) ggplot2::discrete_scale("fill", "qualitative", qualitative_pal(qual_codes), ...)
650650
}
651651
}
652652

man/autoThemeOptions.Rd

Lines changed: 2 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)