diff --git a/NEWS.md b/NEWS.md index 1c9422e5ff..30e0f0c096 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # ggplot2 (development version) +* `...` supports `rlang::list2` dynamic dots in all public functions. (@mone27, #4764) + * `theme()` now has a `strip.clip` argument, that can be set to `"off"` to prevent the clipping of strip text and background borders (@teunbrand, #4118) diff --git a/R/geom-abline.r b/R/geom-abline.r index 9778e76386..6437115af6 100644 --- a/R/geom-abline.r +++ b/R/geom-abline.r @@ -112,7 +112,7 @@ geom_abline <- function(mapping = NULL, data = NULL, position = PositionIdentity, show.legend = show.legend, inherit.aes = FALSE, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/geom-bar.r b/R/geom-bar.r index 68d22f0b8b..4f5b3f9aa6 100644 --- a/R/geom-bar.r +++ b/R/geom-bar.r @@ -96,7 +96,7 @@ geom_bar <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( width = width, na.rm = na.rm, orientation = orientation, diff --git a/R/geom-bin2d.r b/R/geom-bin2d.r index c5f6231e13..281531245c 100644 --- a/R/geom-bin2d.r +++ b/R/geom-bin2d.r @@ -39,7 +39,7 @@ geom_bin_2d <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/geom-blank.r b/R/geom-blank.r index e7f52a369a..341d410eb6 100644 --- a/R/geom-blank.r +++ b/R/geom-blank.r @@ -23,7 +23,7 @@ geom_blank <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list(...), + params = list2(...), check.aes = FALSE ) } diff --git a/R/geom-boxplot.r b/R/geom-boxplot.r index fb8e0d3001..bf11343869 100644 --- a/R/geom-boxplot.r +++ b/R/geom-boxplot.r @@ -141,7 +141,7 @@ geom_boxplot <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( outlier.colour = outlier.color %||% outlier.colour, outlier.fill = outlier.fill, outlier.shape = outlier.shape, diff --git a/R/geom-col.r b/R/geom-col.r index 510e57c9d8..6ea87b3be6 100644 --- a/R/geom-col.r +++ b/R/geom-col.r @@ -16,7 +16,7 @@ geom_col <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( width = width, na.rm = na.rm, ... diff --git a/R/geom-contour.r b/R/geom-contour.r index df156c2f94..a3750906e4 100644 --- a/R/geom-contour.r +++ b/R/geom-contour.r @@ -93,7 +93,7 @@ geom_contour <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( bins = bins, binwidth = binwidth, breaks = breaks, @@ -125,7 +125,7 @@ geom_contour_filled <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( bins = bins, binwidth = binwidth, breaks = breaks, diff --git a/R/geom-count.r b/R/geom-count.r index 8c02e75257..908f57eb52 100644 --- a/R/geom-count.r +++ b/R/geom-count.r @@ -55,7 +55,7 @@ geom_count <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/geom-crossbar.r b/R/geom-crossbar.r index 89c1c60cff..e552c0b000 100644 --- a/R/geom-crossbar.r +++ b/R/geom-crossbar.r @@ -16,7 +16,7 @@ geom_crossbar <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( fatten = fatten, na.rm = na.rm, orientation = orientation, diff --git a/R/geom-curve.r b/R/geom-curve.r index 9a44a85be3..9ab6045aa9 100644 --- a/R/geom-curve.r +++ b/R/geom-curve.r @@ -21,7 +21,7 @@ geom_curve <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( arrow = arrow, arrow.fill = arrow.fill, curvature = curvature, diff --git a/R/geom-density.r b/R/geom-density.r index 9bd3fc320f..d8e3f72263 100644 --- a/R/geom-density.r +++ b/R/geom-density.r @@ -69,7 +69,7 @@ geom_density <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, orientation = orientation, outline.type = outline.type, diff --git a/R/geom-density2d.r b/R/geom-density2d.r index b8c705eaa2..6f7629472e 100644 --- a/R/geom-density2d.r +++ b/R/geom-density2d.r @@ -81,7 +81,7 @@ geom_density_2d <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( lineend = lineend, linejoin = linejoin, linemitre = linemitre, @@ -124,7 +124,7 @@ geom_density_2d_filled <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, contour = TRUE, contour_var = contour_var, diff --git a/R/geom-dotplot.r b/R/geom-dotplot.r index a087e6cb4c..25ccb46ff8 100644 --- a/R/geom-dotplot.r +++ b/R/geom-dotplot.r @@ -159,7 +159,7 @@ geom_dotplot <- function(mapping = NULL, data = NULL, show.legend = show.legend, inherit.aes = inherit.aes, # Need to make sure that the binaxis goes to both the stat and the geom - params = list( + params = list2( binaxis = binaxis, binwidth = binwidth, binpositions = binpositions, diff --git a/R/geom-errorbar.r b/R/geom-errorbar.r index dd2cfd5551..2b33814b22 100644 --- a/R/geom-errorbar.r +++ b/R/geom-errorbar.r @@ -15,7 +15,7 @@ geom_errorbar <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, orientation = orientation, ... diff --git a/R/geom-errorbarh.r b/R/geom-errorbarh.r index 91d3569e86..02e5e44f04 100644 --- a/R/geom-errorbarh.r +++ b/R/geom-errorbarh.r @@ -38,7 +38,7 @@ geom_errorbarh <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/geom-freqpoly.r b/R/geom-freqpoly.r index bf6f9f39ef..0cdf193e08 100644 --- a/R/geom-freqpoly.r +++ b/R/geom-freqpoly.r @@ -7,7 +7,7 @@ geom_freqpoly <- function(mapping = NULL, data = NULL, show.legend = NA, inherit.aes = TRUE) { - params <- list(na.rm = na.rm, ...) + params <- list2(na.rm = na.rm, ...) if (identical(stat, "bin")) { params$pad <- TRUE } diff --git a/R/geom-function.R b/R/geom-function.R index 30b58d8426..98b161a781 100644 --- a/R/geom-function.R +++ b/R/geom-function.R @@ -67,7 +67,7 @@ geom_function <- function(mapping = NULL, data = NULL, stat = "function", position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/geom-hex.r b/R/geom-hex.r index e28e1cbe74..009491cb3b 100644 --- a/R/geom-hex.r +++ b/R/geom-hex.r @@ -41,7 +41,7 @@ geom_hex <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/geom-histogram.r b/R/geom-histogram.r index e604f5e592..07685eaf19 100644 --- a/R/geom-histogram.r +++ b/R/geom-histogram.r @@ -131,7 +131,7 @@ geom_histogram <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( binwidth = binwidth, bins = bins, na.rm = na.rm, diff --git a/R/geom-hline.r b/R/geom-hline.r index 8e0151d012..cc5ef3b724 100644 --- a/R/geom-hline.r +++ b/R/geom-hline.r @@ -32,7 +32,7 @@ geom_hline <- function(mapping = NULL, data = NULL, position = PositionIdentity, show.legend = show.legend, inherit.aes = FALSE, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/geom-jitter.r b/R/geom-jitter.r index 2660dbfb57..61bc6f70bf 100644 --- a/R/geom-jitter.r +++ b/R/geom-jitter.r @@ -57,7 +57,7 @@ geom_jitter <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/geom-label.R b/R/geom-label.R index 826d16a72b..863d46e518 100644 --- a/R/geom-label.R +++ b/R/geom-label.R @@ -31,7 +31,7 @@ geom_label <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( parse = parse, label.padding = label.padding, label.r = label.r, diff --git a/R/geom-linerange.r b/R/geom-linerange.r index 2d5bf284d6..e3195e0e5b 100644 --- a/R/geom-linerange.r +++ b/R/geom-linerange.r @@ -78,7 +78,7 @@ geom_linerange <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, orientation = orientation, ... diff --git a/R/geom-map.r b/R/geom-map.r index 8690063fd3..75c4ced490 100644 --- a/R/geom-map.r +++ b/R/geom-map.r @@ -92,7 +92,7 @@ geom_map <- function(mapping = NULL, data = NULL, position = PositionIdentity, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( map = map, na.rm = na.rm, ... diff --git a/R/geom-path.r b/R/geom-path.r index e1bcce2fd1..ea1007f056 100644 --- a/R/geom-path.r +++ b/R/geom-path.r @@ -112,7 +112,7 @@ geom_path <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( lineend = lineend, linejoin = linejoin, linemitre = linemitre, @@ -248,7 +248,7 @@ geom_line <- function(mapping = NULL, data = NULL, stat = "identity", position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, orientation = orientation, ... @@ -293,7 +293,7 @@ geom_step <- function(mapping = NULL, data = NULL, stat = "identity", position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( direction = direction, na.rm = na.rm, ... diff --git a/R/geom-point.r b/R/geom-point.r index 2981a909dc..7700fc6add 100644 --- a/R/geom-point.r +++ b/R/geom-point.r @@ -97,7 +97,7 @@ geom_point <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/geom-pointrange.r b/R/geom-pointrange.r index 834a4f9f8a..7291100a2f 100644 --- a/R/geom-pointrange.r +++ b/R/geom-pointrange.r @@ -16,7 +16,7 @@ geom_pointrange <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( fatten = fatten, na.rm = na.rm, orientation = orientation, diff --git a/R/geom-polygon.r b/R/geom-polygon.r index 74f98612f6..9eb3fe13a2 100644 --- a/R/geom-polygon.r +++ b/R/geom-polygon.r @@ -93,7 +93,7 @@ geom_polygon <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, rule = rule, ... diff --git a/R/geom-quantile.r b/R/geom-quantile.r index 782a43454d..4047d00799 100644 --- a/R/geom-quantile.r +++ b/R/geom-quantile.r @@ -47,7 +47,7 @@ geom_quantile <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( lineend = lineend, linejoin = linejoin, linemitre = linemitre, diff --git a/R/geom-raster.r b/R/geom-raster.r index a9f4b61a8d..95f806115e 100644 --- a/R/geom-raster.r +++ b/R/geom-raster.r @@ -29,7 +29,7 @@ geom_raster <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( hjust = hjust, vjust = vjust, interpolate = interpolate, diff --git a/R/geom-rect.r b/R/geom-rect.r index aa490b27e8..09de9fec32 100644 --- a/R/geom-rect.r +++ b/R/geom-rect.r @@ -15,7 +15,7 @@ geom_rect <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( linejoin = linejoin, na.rm = na.rm, ... diff --git a/R/geom-ribbon.r b/R/geom-ribbon.r index b5f8a993f6..41243fb84c 100644 --- a/R/geom-ribbon.r +++ b/R/geom-ribbon.r @@ -59,7 +59,7 @@ geom_ribbon <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, orientation = orientation, outline.type = outline.type, @@ -214,7 +214,7 @@ geom_area <- function(mapping = NULL, data = NULL, stat = "identity", position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, orientation = orientation, outline.type = outline.type, diff --git a/R/geom-rug.r b/R/geom-rug.r index 68e46a17f8..be71ab74eb 100644 --- a/R/geom-rug.r +++ b/R/geom-rug.r @@ -70,7 +70,7 @@ geom_rug <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( outside = outside, sides = sides, length = length, diff --git a/R/geom-segment.r b/R/geom-segment.r index fe922e5093..a0e4a7e0f0 100644 --- a/R/geom-segment.r +++ b/R/geom-segment.r @@ -85,7 +85,7 @@ geom_segment <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( arrow = arrow, arrow.fill = arrow.fill, lineend = lineend, diff --git a/R/geom-sf.R b/R/geom-sf.R index 0111c6fd5b..374ffe0b29 100644 --- a/R/geom-sf.R +++ b/R/geom-sf.R @@ -230,7 +230,7 @@ geom_sf <- function(mapping = aes(), data = NULL, stat = "sf", position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) @@ -273,7 +273,7 @@ geom_sf_label <- function(mapping = aes(), data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( parse = parse, label.padding = label.padding, label.r = label.r, @@ -317,7 +317,7 @@ geom_sf_text <- function(mapping = aes(), data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( parse = parse, check_overlap = check_overlap, na.rm = na.rm, diff --git a/R/geom-smooth.r b/R/geom-smooth.r index 5b94f4b070..0980e56b06 100644 --- a/R/geom-smooth.r +++ b/R/geom-smooth.r @@ -93,7 +93,7 @@ geom_smooth <- function(mapping = NULL, data = NULL, show.legend = NA, inherit.aes = TRUE) { - params <- list( + params <- list2( na.rm = na.rm, orientation = orientation, se = se, diff --git a/R/geom-spoke.r b/R/geom-spoke.r index 6622f9e0ef..e3c10df93b 100644 --- a/R/geom-spoke.r +++ b/R/geom-spoke.r @@ -34,7 +34,7 @@ geom_spoke <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/geom-text.r b/R/geom-text.r index 0afc6fa7ae..e34fcb5cda 100644 --- a/R/geom-text.r +++ b/R/geom-text.r @@ -179,7 +179,7 @@ geom_text <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( parse = parse, check_overlap = check_overlap, na.rm = na.rm, diff --git a/R/geom-tile.r b/R/geom-tile.r index f1d6bc3bc7..ae2fd5556c 100644 --- a/R/geom-tile.r +++ b/R/geom-tile.r @@ -82,7 +82,7 @@ geom_tile <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( linejoin = linejoin, na.rm = na.rm, ... diff --git a/R/geom-violin.r b/R/geom-violin.r index 16371916aa..9f0465a7aa 100644 --- a/R/geom-violin.r +++ b/R/geom-violin.r @@ -99,7 +99,7 @@ geom_violin <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( trim = trim, scale = scale, draw_quantiles = draw_quantiles, diff --git a/R/geom-vline.r b/R/geom-vline.r index c92d34d8c4..32113b92e8 100644 --- a/R/geom-vline.r +++ b/R/geom-vline.r @@ -32,7 +32,7 @@ geom_vline <- function(mapping = NULL, data = NULL, position = PositionIdentity, show.legend = show.legend, inherit.aes = FALSE, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/ggproto.r b/R/ggproto.r index 0ff8185528..87b41d0553 100644 --- a/R/ggproto.r +++ b/R/ggproto.r @@ -57,7 +57,7 @@ ggproto <- function(`_class` = NULL, `_inherit` = NULL, ...) { e <- new.env(parent = emptyenv()) - members <- list(...) + members <- list2(...) if (length(members) != sum(nzchar(names(members)))) { abort("All members of a ggproto object must be named.") } diff --git a/R/guide-bins.R b/R/guide-bins.R index c0e29ffe92..137c76f073 100644 --- a/R/guide-bins.R +++ b/R/guide-bins.R @@ -89,7 +89,7 @@ guide_bins <- function( show.limits = NULL, ...) { - structure(list( + structure(list2( # title title = title, title.position = title.position, diff --git a/R/guide-colorbar.r b/R/guide-colorbar.r index 5c933fa5f0..060d3f7557 100644 --- a/R/guide-colorbar.r +++ b/R/guide-colorbar.r @@ -147,7 +147,7 @@ guide_colourbar <- function( if (!is.null(barwidth) && !is.unit(barwidth)) barwidth <- unit(barwidth, default.unit) if (!is.null(barheight) && !is.unit(barheight)) barheight <- unit(barheight, default.unit) - structure(list( + structure(list2( # title title = title, title.position = title.position, diff --git a/R/guide-legend.r b/R/guide-legend.r index b6cb608082..3a3e75a17b 100644 --- a/R/guide-legend.r +++ b/R/guide-legend.r @@ -161,7 +161,7 @@ guide_legend <- function(# title } structure( - list( + list2( # title title = title, title.position = title.position, diff --git a/R/labeller.r b/R/labeller.r index 1d7e4c4473..b6cdf5a01c 100644 --- a/R/labeller.r +++ b/R/labeller.r @@ -422,7 +422,7 @@ labeller <- function(..., .rows = NULL, .cols = NULL, if (lifecycle::is_present(keep.as.numeric)) { lifecycle::deprecate_warn("2.0.0", "labeller(keep.as.numeric)") } - dots <- list(...) + dots <- list2(...) .default <- as_labeller(.default) function(labels) { diff --git a/R/limits.r b/R/limits.r index b860f05936..fcaebee995 100644 --- a/R/limits.r +++ b/R/limits.r @@ -77,7 +77,7 @@ #' p + coord_cartesian(xlim =c(Sys.Date() - 30, NA), ylim = c(10, 20)) #' lims <- function(...) { - args <- list(...) + args <- list2(...) if (any(!has_name(args))) { abort("All arguments must be named") @@ -181,7 +181,7 @@ limits.POSIXlt <- function(lims, var) { #' geom_point(aes(colour = factor(cyl))) + #' expand_limits(colour = factor(seq(2, 10, by = 2))) expand_limits <- function(...) { - data <- list(...) + data <- list2(...) data_dfs <- vapply(data, is.data.frame, logical(1)) data <- do.call(c, c(list(data[!data_dfs]), data[data_dfs])) n_rows <- max(vapply(data, length, integer(1))) diff --git a/R/stat-bin.r b/R/stat-bin.r index ae0834988c..8c3b285364 100644 --- a/R/stat-bin.r +++ b/R/stat-bin.r @@ -64,7 +64,7 @@ stat_bin <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( binwidth = binwidth, bins = bins, center = center, diff --git a/R/stat-bin2d.r b/R/stat-bin2d.r index bf3fd73328..132b51bc39 100644 --- a/R/stat-bin2d.r +++ b/R/stat-bin2d.r @@ -29,7 +29,7 @@ stat_bin_2d <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( bins = bins, binwidth = binwidth, drop = drop, diff --git a/R/stat-binhex.r b/R/stat-binhex.r index 40d7025df5..34db4cdb74 100644 --- a/R/stat-binhex.r +++ b/R/stat-binhex.r @@ -24,7 +24,7 @@ stat_bin_hex <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( bins = bins, binwidth = binwidth, na.rm = na.rm, diff --git a/R/stat-boxplot.r b/R/stat-boxplot.r index a1b3a7bfa8..eaab709ea8 100644 --- a/R/stat-boxplot.r +++ b/R/stat-boxplot.r @@ -30,7 +30,7 @@ stat_boxplot <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, orientation = orientation, coef = coef, diff --git a/R/stat-contour.r b/R/stat-contour.r index 695af32be9..e4f4b65491 100644 --- a/R/stat-contour.r +++ b/R/stat-contour.r @@ -36,7 +36,7 @@ stat_contour <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( bins = bins, binwidth = binwidth, breaks = breaks, @@ -65,7 +65,7 @@ stat_contour_filled <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( bins = bins, binwidth = binwidth, breaks = breaks, diff --git a/R/stat-count.r b/R/stat-count.r index 42f252c41b..6ae8169710 100644 --- a/R/stat-count.r +++ b/R/stat-count.r @@ -20,7 +20,7 @@ stat_count <- function(mapping = NULL, data = NULL, show.legend = NA, inherit.aes = TRUE) { - params <- list( + params <- list2( na.rm = na.rm, orientation = orientation, width = width, diff --git a/R/stat-density-2d.r b/R/stat-density-2d.r index ddcad85164..01d7ad8c32 100644 --- a/R/stat-density-2d.r +++ b/R/stat-density-2d.r @@ -51,7 +51,7 @@ stat_density_2d <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, contour = contour, contour_var = contour_var, @@ -89,7 +89,7 @@ stat_density_2d_filled <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, contour = contour, contour_var = contour_var, diff --git a/R/stat-density.r b/R/stat-density.r index c0c8bd0371..8f20800ef3 100644 --- a/R/stat-density.r +++ b/R/stat-density.r @@ -47,7 +47,7 @@ stat_density <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( bw = bw, adjust = adjust, kernel = kernel, diff --git a/R/stat-ecdf.r b/R/stat-ecdf.r index 8f6654c67e..0aca895aec 100644 --- a/R/stat-ecdf.r +++ b/R/stat-ecdf.r @@ -56,7 +56,7 @@ stat_ecdf <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( n = n, pad = pad, na.rm = na.rm, diff --git a/R/stat-ellipse.R b/R/stat-ellipse.R index 6788524d8f..a55107f7c6 100644 --- a/R/stat-ellipse.R +++ b/R/stat-ellipse.R @@ -57,7 +57,7 @@ stat_ellipse <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( type = type, level = level, segments = segments, diff --git a/R/stat-function.r b/R/stat-function.r index 99bd7137e0..708a871642 100644 --- a/R/stat-function.r +++ b/R/stat-function.r @@ -36,7 +36,7 @@ stat_function <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( fun = fun, n = n, args = args, diff --git a/R/stat-identity.r b/R/stat-identity.r index 182afb38da..86c8c09b95 100644 --- a/R/stat-identity.r +++ b/R/stat-identity.r @@ -21,7 +21,7 @@ stat_identity <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = FALSE, ... ) diff --git a/R/stat-qq-line.R b/R/stat-qq-line.R index 83d3a25b4f..a4a16fabdb 100644 --- a/R/stat-qq-line.R +++ b/R/stat-qq-line.R @@ -24,7 +24,7 @@ geom_qq_line <- function(mapping = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( distribution = distribution, dparams = dparams, na.rm = na.rm, diff --git a/R/stat-qq.r b/R/stat-qq.r index bbac9c2bf9..7748b9554f 100644 --- a/R/stat-qq.r +++ b/R/stat-qq.r @@ -61,7 +61,7 @@ geom_qq <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( distribution = distribution, dparams = dparams, na.rm = na.rm, diff --git a/R/stat-quantile.r b/R/stat-quantile.r index 059f54ffb7..0e76fb0078 100644 --- a/R/stat-quantile.r +++ b/R/stat-quantile.r @@ -28,7 +28,7 @@ stat_quantile <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( quantiles = quantiles, formula = formula, method = method, diff --git a/R/stat-sf-coordinates.R b/R/stat-sf-coordinates.R index 86daf026b0..fa7769fcbd 100644 --- a/R/stat-sf-coordinates.R +++ b/R/stat-sf-coordinates.R @@ -70,7 +70,7 @@ stat_sf_coordinates <- function(mapping = aes(), data = NULL, geom = "point", position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, fun.geometry = fun.geometry, ... diff --git a/R/stat-sf.R b/R/stat-sf.R index 9e8e139f77..8f80d32fda 100644 --- a/R/stat-sf.R +++ b/R/stat-sf.R @@ -70,7 +70,7 @@ stat_sf <- function(mapping = NULL, data = NULL, geom = "rect", position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/stat-smooth.r b/R/stat-smooth.r index 3b3ba735e7..3c9c7aa40e 100644 --- a/R/stat-smooth.r +++ b/R/stat-smooth.r @@ -64,7 +64,7 @@ stat_smooth <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( method = method, formula = formula, se = se, diff --git a/R/stat-sum.r b/R/stat-sum.r index 21fbe7ddb0..297cde1c7e 100644 --- a/R/stat-sum.r +++ b/R/stat-sum.r @@ -21,7 +21,7 @@ stat_sum <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/stat-summary-2d.r b/R/stat-summary-2d.r index 1c7526425d..df98d0ffdb 100644 --- a/R/stat-summary-2d.r +++ b/R/stat-summary-2d.r @@ -57,7 +57,7 @@ stat_summary_2d <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( bins = bins, binwidth = binwidth, drop = drop, diff --git a/R/stat-summary-bin.R b/R/stat-summary-bin.R index 831b1866b5..c56ff3e70c 100644 --- a/R/stat-summary-bin.R +++ b/R/stat-summary-bin.R @@ -39,7 +39,7 @@ stat_summary_bin <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( fun.data = fun.data, fun = fun, fun.max = fun.max, diff --git a/R/stat-summary-hex.r b/R/stat-summary-hex.r index 6ebfb80ad1..30572dff8f 100644 --- a/R/stat-summary-hex.r +++ b/R/stat-summary-hex.r @@ -20,7 +20,7 @@ stat_summary_hex <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( bins = bins, binwidth = binwidth, drop = drop, diff --git a/R/stat-summary.r b/R/stat-summary.r index c7a2325d5f..41107469aa 100644 --- a/R/stat-summary.r +++ b/R/stat-summary.r @@ -161,7 +161,7 @@ stat_summary <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( fun.data = fun.data, fun = fun, fun.max = fun.max, diff --git a/R/stat-unique.r b/R/stat-unique.r index 79a824c0c9..2f9ec6ec30 100644 --- a/R/stat-unique.r +++ b/R/stat-unique.r @@ -23,7 +23,7 @@ stat_unique <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( na.rm = na.rm, ... ) diff --git a/R/stat-ydensity.r b/R/stat-ydensity.r index 6f95f98b0d..b42c7bb710 100644 --- a/R/stat-ydensity.r +++ b/R/stat-ydensity.r @@ -40,7 +40,7 @@ stat_ydensity <- function(mapping = NULL, data = NULL, position = position, show.legend = show.legend, inherit.aes = inherit.aes, - params = list( + params = list2( bw = bw, adjust = adjust, kernel = kernel,