Skip to content

Commit 39cf111

Browse files
committed
Functions as aesthetics, fix extraspace, new message
1 parent 078f650 commit 39cf111

File tree

183 files changed

+14106
-14648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+14106
-14648
lines changed

NAMESPACE

Lines changed: 596 additions & 596 deletions
Large diffs are not rendered by default.

R/layer.r

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ Layer <- ggproto("Layer", NULL,
232232
nondata_cols <- check_nondata_cols(evaled)
233233
if(length(nondata_cols) > 0){
234234
msg <- paste0(
235-
"Aesthetics must be valid data columns: ", nondata_cols,
236-
". Did you forget to add stat()?"
235+
"Aesthetics must be valid data columns: `", deparse(aesthetics[[nondata_cols]]),
236+
"`. Did you mistype the name of a data column or forget to add stat()?"
237237
)
238238
stop(msg, call. = FALSE)
239239
}
@@ -292,10 +292,10 @@ Layer <- ggproto("Layer", NULL,
292292

293293
# Check that all columns in aesthetic stats are valid data
294294
nondata_stat_cols <- check_nondata_cols(stat_data)
295-
if(length(nondata_stat_cols) > 0){
295+
if (length(nondata_stat_cols) > 0){
296296
msg <- paste0(
297-
"Aesthetics must be valid computed stats: ", nondata_stat_cols,
298-
". Did you map your stat in the wrong layer?"
297+
"Aesthetics must be valid computed stats: `", deparse(aesthetics[[nondata_stat_cols]]),
298+
"`. Did you map your stat in the wrong layer?"
299299
)
300300
stop(msg, call. = FALSE)
301301
}

R/utilities.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ is.discrete <- function(x) {
358358
# returns the names of any columns that are not.
359359
# We define "data" as atomic types or lists, not functions or otherwise
360360
check_nondata_cols <- function(x) {
361-
idx <- (vapply(x, function(x) rlang::is_atomic(x) || rlang::is_list(x), logical(1)))
361+
idx <- (vapply(x, function(x) rlang::is_vector(x), logical(1)))
362362
names(x)[which(!idx)]
363363
}
364364

man/absoluteGrob.Rd

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

man/add_theme.Rd

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

man/aes.Rd

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

0 commit comments

Comments
 (0)