@@ -71,14 +71,13 @@ qplot <- function(x, y, ..., data, facets = NULL, margins = FALSE,
71
71
if (! missing(position )) warning(" `position` is deprecated" , call. = FALSE )
72
72
if (! is.character(geom )) stop(" `geom` must be a character vector" , call. = FALSE )
73
73
74
- exprs <- rlang :: enquos(x = x , y = y , ... )
75
- is_missing <- vapply(exprs , rlang :: quo_is_missing , logical (1 ))
74
+ exprs <- rlang :: enquos(x = x , y = y , ... , .ignore_empty = " all" )
76
75
# treat arguments as regular parameters if they are wrapped into I() or
77
76
# if they don't have a name that is in the list of all aesthetics
78
77
is_constant <- (! names(exprs ) %in% ggplot_global $ all_aesthetics ) |
79
78
vapply(exprs , rlang :: quo_is_call , logical (1 ), name = " I" )
80
79
81
- mapping <- new_aes(exprs [! is_missing & ! is_constant ], env = parent.frame())
80
+ mapping <- new_aes(exprs [! is_constant ], env = parent.frame())
82
81
83
82
consts <- exprs [is_constant ]
84
83
@@ -90,12 +89,7 @@ qplot <- function(x, y, ..., data, facets = NULL, margins = FALSE,
90
89
xlab <- rlang :: quo_name(exprs $ x )
91
90
}
92
91
if (is.null(ylab )) {
93
- # Work around quo_name() bug: https://github.com/r-lib/rlang/issues/430
94
- if (rlang :: quo_is_null(exprs $ y )) {
95
- ylab <- " NULL"
96
- } else {
97
- ylab <- rlang :: quo_name(exprs $ y )
98
- }
92
+ ylab <- rlang :: quo_name(exprs $ y )
99
93
}
100
94
101
95
if (missing(data )) {
0 commit comments