I am creating a ggplot, and wrapping it in a function (I am using, and am very excited about, the dev version of ggplot2 which uses tidyeval).
If I want to select a column based on its position (e.g. the first column) for the aes, is there an easy way to do it programmatically? I am used to the dplyr world, where I can just do
tbl1 %>% select(1)
I get the first column of tbl1. Can I do that in ggplot2-land?
Did you try doing it? What was the result?
If I understand correctly, all of the tidyverse packages are using the same mechanism to select names, specifically, tidyselect package. That means that ggplot2 is very likely using it as well and your approach should work.