Piping in R – a celebration of Robbie Burns Day

This week for TeamShrub Lab meeting we did Isla’s intro workshop to piping in R.  I discovered piping nearly a year ago and it has changed my coding life!  No more nested loops for me, well maybe not quite as many.  I am still on my way to learning all the functionality of dplyr, but in case you haven’t discovered the wonders of piping and dplyr here are a few useful links.

Intro to dplyr
https://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html

Here is a blog on the concept of piping in R
http://www.r-statistics.com/2014/08/simpler-r-coding-with-pipes-the-present-and-future-of-the-magrittr-package/

Here are a couple of blogs that put piping and dplyr together!
http://seananderson.ca/2014/09/13/dplyr-intro.html
http://neondataskills.org/R/GREPL-Filter-Piping-in-DPLYR-Using-R/

And finally here is Haydn’s piping joke converted to dplyr for Robbie Burns Day.

library(dplyr)
RobbieBurnsDay <- the haggis %>% do(“in”)

Do you get it?  Piping in the haggis!

by Isla

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s