Skip to content
Prev 59418 / 63430 Next

[External] brief update on the pipe operator in R-devel

After some discussions we've settled on a syntax of the form

     mtcars |> subset(cyl == 4) |> d => lm(mpg ~ disp, data = d)

to handle cases where the pipe lhs needs to be passed to an argument
other than the first of the function called on the rhs. This seems a
to be a reasonable balance between making these non-standard cases
easy to see but still easy to write. This is now committed to R-devel.

Best,

luke
On Tue, 22 Dec 2020, luke-tierney at uiowa.edu wrote: