Closed
Description
The recent change to ggplot2 that helps people remember to use + instead of %>% is great! however it doesn't show if you passed aes()
to geom_*()
instead of ggplot()
.
library(ggplot2)
library(magrittr)
ggplot(mtcars, aes(mpg, cyl)) %>%
geom_point()
#> Error: `mapping` must be created by `aes()`
#> Did you use %>% instead of +?
ggplot(mtcars) %>%
geom_point(aes(mpg, cyl))
#> Error: `data` must be a data frame, or other object coercible by `fortify()`, not an S3 object with class uneval
#> Did you accidentally pass `aes()` to the `data` argument?
Created on 2018-08-26 by the reprex
package (v0.2.0).
Metadata
Metadata
Assignees
Labels
No labels