The other day someone posted a link to this python package which provides a bash-style pipe operator to manipulate streams through a series of transformers. It seemed like a cool and powerful way of doing the usual data pre-processing / munging I often do in python.
But what about R? I also do a lot of processing in R and to me this pipe metaphor also seemed like a natural way of iterating over data frames. So the other day I set about trying to implement an R-thonic pipe operator and about 50 lines later I succeeded. It’s actually more robust and featureful than what I’ll describe below, but even in these simple use cases I can see it making manipulating data much easier.
Read more here: http://www.facebook.com/notes/jonathan-chang/pipes-in-r/10150174062816212