4 ms·
Pipes have been a game-changer for me in R with the tidyverse suite of packages. Base R doesn't have pipes, requiring a bit more saving of objects or a compromi
by WhompingWindows 8y ago
Pipes have been a game-changer for me in R with the tidyverse suite of packages. Base R doesn't have pipes, requiring a bit more saving of objects or a compromise on code readability.
One criticism would be that ggplot2 uses the "+" to add more graph features, whereas the rest of tidyverse uses "%>%" as its pipe, when ideally ggplot2 would also use it. One of my most common errors with ggplot2 is not utilizing the + or the %>% in the right places.
- vharuck 8y agoI've always thought of ggplot2's process as building a plot object. Most steps only add to the input. Of course, Hadley admitted it was because he wrote ggplot2 before adopting pipes into his packages.