My blog articles on Adolfo Álvarez
/blog/
Recent content in My blog articles on Adolfo ÁlvarezHugo -- gohugo.ioenThu, 16 Sep 2021 00:00:00 +0000Plumbers, chains, and famous painters: The (updated) history of the pipe operator in R
/blog/2021-09-16-plumbers-chains-and-famous-painters-the-history-of-the-pipe-operator-in-r/
Thu, 16 Sep 2021 00:00:00 +0000/blog/2021-09-16-plumbers-chains-and-famous-painters-the-history-of-the-pipe-operator-in-r/Note: This post is an updated version of another I published in 2014, in a previous version of this site.
Our story starts as many other R related stories… in stackoverflow. On January 17th, 2012, an anonymous user “user4” asked the following question:
How can you implement F#’s forward pipe operator in R? The operator makes it possible to easily chain a sequence of calculations. For example, when you have an input data and want to call functions foo and bar in sequence, you can write: