Fresh out of the #RStats oven:
It is now (= R-devel to become R 4.2.0) possible to use underscore (_) as a placeholder on the right-hand side (RHS) of a forward pipe, e.g.
mtcars |> subset(cyl == 4) |> lm(mpg ~ disp, data = _)
github.com/wch/r-source/comm…
#RStats community, really? It's been like 5 hours now and no one noticed the big news? 😛
github.com/wch/r-source/comm…
Thank you @LukeTierney4 @_lionelhenry @jimhester_ (who else?)
#pipypipy
14
86
26
319
Nice indeed. But then
lm(mpg ~ disp, data = mtcars, subset = cyl==4)
is still shorter, and quite possibly more readable. 😉
#rstats
Mar 8, 2022 · 9:26 PM UTC
3
1
19








