but have you seen the #rstats heretics who use aes() outside the ggplot() function? keep an eye on those ones
🕵️♀️
🕵️♀️
Reposted from
Hadley Wickham
Bluesky really is the new #rstats twitter because we have the first base R vs tidyverse flame war 🤣
Comments
library(tidyverse)
pinguins |>
ggplot() +
aes(x = comprimento_nadadeira, y = massa_corporal) +
geom_point()
👀
“We write which dataset we want to use..
then we start a plot with ggplot()…
then we write which are the columns of the data that we want to use in the x and y axis in aes()..
then we add a geometry with geom_*()”
Otherwise to a beginner it just looks like "here's an aes inside a function, here's another one, wtf"
Each + is the next layer in the grammar of graphics.
And aesthetic inheritance/override always confuses my students, pulling aes out of ggplot is clearer.