Skip to content

Commit 918103b

Browse files
committed
fix tidy styling in extract_target_is_likey_data(), improve parameter documentation for aes()
1 parent 49973d4 commit 918103b

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

R/aes.r

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ NULL
2222
#' programming vignette](http://dplyr.tidyverse.org/articles/programming.html)
2323
#' to learn more about these techniques.
2424
#'
25-
#' @param x,y,... List of name-value pairs in the form `aesthetic = column_name`
25+
#' @param x,y,... List of name-value pairs in the form `aesthetic = variable`
2626
#' describing which variables in the layer data should be mapped to which
27-
#' aesthetics used by paired geom/stat. The names for x and y aesthetics are typically
28-
#' omitted because they are so common; all other aesthetics must be named.
27+
#' aesthetics used by the paired geom/stat. The expression `variable` is
28+
#' evaluated within the layer data, so there is no need to refer to
29+
#' the original dataset (i.e., use `ggplot(df, aes(variable))`
30+
#' instead of `ggplot(df, aes(df$variable))`). The names for x and y aesthetics
31+
#' are typically omitted because they are so common; all other aesthetics must be named.
2932
#' @seealso [vars()] for another quoting function designed for
3033
#' faceting specifications.
3134
#' @return A list with class `uneval`. Components of the list are either
@@ -378,7 +381,7 @@ alternative_aes_extract_usage <- function(x) {
378381
}
379382

380383
extract_target_is_likely_data <- function(x, data, env) {
381-
if(!is.name(x[[2]])) {
384+
if (!is.name(x[[2]])) {
382385
return(FALSE)
383386
}
384387

man/aes.Rd

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

0 commit comments

Comments
 (0)