4 ms·
ggplot2 is pretty much an exception at this point, and if the package was created today it would use the pipe instead of add [1]. Most packages use pipes now (e
by erikgahner 2y ago
ggplot2 is pretty much an exception at this point, and if the package was created today it would use the pipe instead of add [1]. Most packages use pipes now (especially with the introduction of the pipe operator in R 4.1.0).
[1] https://forum.posit.co/t/why-cant-ggplot2-use/4372/7 https://forum.posit.co/t/why-cant-ggplot2-use/4372/7
- deleted 2y ago[deleted]
- dr_kiszonka 2y agoI am no R expert, but pipes don't seem the most intuitive for ggplot. This is because they would imply that, e.g., ggtitle() %>% geom_point() means that ggtitle() outputs an input for geom_point().
- hadley 2y agoThat’s exactly how ggplot (not 2!) worked: https://github.com/hadley/ggplot1 https://github.com/hadley/ggplot1