Publications by Kun Ren
Difference between magrittr and pipeR
(This post is rewritten to adapt to the latest release of pipeR) Pipeline is receiving increasing attention in R community these days. It is hard to tell when it begins but more people start to use it since the easy-and-fast dplyr package imports the magic operator %>% from magrittr, the pioneer package of pipeline operators for R. The two packag...
8188 sym R (2706 sym/15 pcs)
Easier way to chain commands using Pipe function
In pipeR 0.4 version, one of the new features is Pipe() function. The function basically creates a Pipe object that allows command chaining with $, and thus makes it easier to perform operations in pipeline without any external operator. In this post, I will introduce how to use this function and some basic knowledge about how it works. But befor...
5264 sym R (1859 sym/18 pcs)
More operators or more syntax?
The motivation of pipeline operator is to make code more readable. In many cases, it indeed better organizes code so that the logic is presented in human-readable fluent style. In other cases, however, such operators can make things worse. Recently, I had an interesting discussion on how to add side effect piping to pipeR functionality (in this i...
5739 sym R (2062 sym/5 pcs)
pipeR tutorial is released
Twelve days after the initial commit, pipeR tutorial is released! If you want to write R code fluently and process data elegantly, I strongly recommend that you read this tutorial which is designed to serve as a complete guide to pipeR package, including how it works with dplyr, rlist, and rvest with vivid examples. You can also provide suggesti...
872 sym
Tips on non-standard evaluation in R
One of my favorite features of R is its meta-programming facilities. It can be simply demonstrated by the following examples. An ordinary use of R is to do statistical computing. We can evaluate something like sin(0) [1] 0 Meta-programming in R allows users to manipulate the expression to evaluate. We can use quote to create an object that rep...
7714 sym R (2087 sym/23 pcs)