I am trying this very simple code:
mtcars %>%
mutate(Bla = cyl+mpg) %>%
ggplot(. %>%
filter(am == 1), aes(x = mpg, y = cyl)) +
geom_point()
It doesn’t work and gives out an error You've supplied a <fseq> object
. However, the following works:
ggplot(mtcars %>%
mutate(Bla = cyl+mpg) %>%
filter(am == 1), aes(x = mpg, y = cyl)) +
geom_point()
Therefore, it seems that it’s not possible to pass the dot .
argument to ggplot and then follow it along with a pipeline.
I swear that I used to be able to do this, therefore my questions are:
- Was this changed at some point in ggplot and am I just doing the old thing; or was this never possible and I am doing it completely wrong?
- If this was indeed changed, then what is now the preferred and suggested ways to pass these dot arguments?