3 ms·
> I haven't spent much time with dplyr, but I think it does a couple things One of the cooler features in dplyr is the '%.%' operator which allows you to chain
by craigching 13y ago
> I haven't spent much time with dplyr, but I think it does a couple things
One of the cooler features in dplyr is the '%.%' operator which allows you to chain operations. So you can write something like this in dplyr:
Batting %.%
group_by(playerID) %.%
summarise(total = sum(G)) %.%
arrange(desc(total)) %.%
head(5)
which is very readable. That example stolen shamelessly from [1] ;)
[1] -- http://blog.rstudio.org/2014/01/17/introducing-dplyr/ http://blog.rstudio.org/2014/01/17/introducing-dplyr/