From fe8d805f644bc86d9368ba0fe7f47f92697d367b Mon Sep 17 00:00:00 2001 From: Kara Woo Date: Thu, 23 Aug 2018 15:10:12 -0700 Subject: [PATCH 1/2] Only print the names of the aesthetics with mismatched length --- R/geom-.r | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/geom-.r b/R/geom-.r index 6ddb7a1499..c5050349cd 100644 --- a/R/geom-.r +++ b/R/geom-.r @@ -184,7 +184,7 @@ check_aesthetics <- function(x, n) { stop( "Aesthetics must be either length 1 or the same as the data (", n, "): ", - paste(names(!good), collapse = ", "), + paste(names(which(!good)), collapse = ", "), call. = FALSE ) } From 87d2a4b453b907b14876973cb70ee1d15e97a19c Mon Sep 17 00:00:00 2001 From: Kara Woo Date: Thu, 23 Aug 2018 16:37:47 -0700 Subject: [PATCH 2/2] Add NEWS.md bullet --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index 520dc1e6ee..3f8644df2b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # ggplot2 3.0.0.9000 +* The error message in `compute_aesthetics()` now provides the names of only + aesthetics with mismatched lengths, rather than all aesthetics (@karawoo, + #2853). + * `geom_sf()` now respects `lineend`, `linejoin`, and `linemitre` parameters for lines and polygons (@alistaire47, #2826)