[Rd] \>

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Sun Jun 30 00:24:38 CEST 2024


> 	  Yes. I'm not yet facile with "|>", but I'm learning.
> 
> 
> 	  Spencer Graves

There's very little to know.  This:

      x |> f() |> g()

is just a different way of writing

     g(f(x))

If f() or g() have extra arguments, just add them afterwards:

     x |> f(a = 1) |> g(b = 2)

is just

     g(f(x, a = 1), b = 2)

This isn't quite true of the magrittr pipe, but it is exactly true of 
the base pipe.

Duncan Murdoch



More information about the R-devel mailing list