[Rd] Plans for the pipe bind operator?

SOEIRO Thomas Thom@@@SOEIRO @end|ng |rom @p-hm@|r
Fri Jan 2 09:54:19 CET 2026


Hello,

The experimental (undocumented?) pipe bind operator (=>) was introduced in January 2021 (https://stat.ethz.ch/pipermail/r-devel/2021-January/080396.html). In December 2021, Luke Tierney said that it might be dropped (https://stat.ethz.ch/pipermail/r-devel/2021-December/081384.html).

It is still present in R-devel (to become R 4.6):

mtcars |> (\(x) lm(mpg ~ disp, data = x))()
mtcars$mpg |> quantile() |> (\(x) sprintf("%.1f (%.1f, %.1f)", x[3], x[2], x[4]))()

Sys.setenv("_R_USE_PIPEBIND_" = TRUE)
mtcars |> x => lm(mpg ~ disp, data = x)
mtcars$mpg |> quantile() |> x => sprintf("%.1f (%.1f, %.1f)", x[3], x[2], x[4])

Since a few years have passed, are there now any plans regarding the pipe bind operator?

I still hope it will be officially supported, as I find it a very readable alternative to anonymous functions in pipe chains (for cases where the placeholder is not supported). It might be easily adopted, since similar syntax exists in other widely used languages (e.g., arrow functions in ES6/JS).

Best,
Thomas



More information about the R-devel mailing list