Menu Home

R is Getting an Official Pipe Operator

It looks like R is getting an official pipe operator (ref). R doesn’t work under an RFC process, so we hear about these things and they are discussed on the R-devel mailing list.

I’ve written on this topic before (ref), and I have taped some new comments. This sort of pipe is a combination of function composition and function application.

(link)

My feeling is: argument inserting syntax translation is indeed a tempting way to go. I think this misses some great coding opportunities that arise when one can guarantee the piped entity is a realized value and also use placeholders. Also a lot is lost when one fails to work out some of the niceties in piping into expressions instead of just functions. But, I understand nobody has asked me.

Function oriented syntax transform appears to be both what RStudio wants, and what R-core is implementing (please keep in mind, these are two different actors in the R-space). So it is what it is.

Categories: Coding Opinion Programming

Tagged as:

jmount

Data Scientist and trainer at Win Vector LLC. One of the authors of Practical Data Science with R.

1 reply

%d bloggers like this: