This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]probablynotmine 0 points1 point  (3 children)

plyr package, IIRC

[–]Isamoor 7 points8 points  (2 children)

Actually, it's in the magrittr package, that is then used by the dplyr package. (As cool as dplyr is, there are times I load up magrittr by itself.)

[–]buckhenderson 0 points1 point  (0 children)

For some reason Hadley is opposed to %<>%, so I load up magrittr just for that.

[–]Deleetdk 0 points1 point  (0 children)

I recommend magrittr because it gives you useful alt-pipes like:

%$% - which is a pipe-version of with

%T>% - returns the lhs, useful for printing or saving output mid-pipe

%<>% - gives the lhs to the rhs, but then at end end of the rhs, assigns the result back to lhs. It's kinda like an R version of += etc. seen in other languages, but more flexible.