[Rd] base R pipe documentation

Bill Dunlap w||||@mwdun|@p @end|ng |rom gm@||@com
Tue May 18 20:08:39 CEST 2021


It would be nice to have "|>" listed in the precedence table in
help(Syntax).  I think it has the same precedence as "%any%" and both are
left-associative.
  > quote( a |> f1() %any% f2())
  f1(a) %any% f2()
  > quote( a %any% f1() |> f2())
  f2(a %any% f1())

help(`|>`) does mention magrittr's pipe operator so the user can compare
and contrast them.

-Bill

On Mon, May 17, 2021 at 10:20 AM Ben Bolker <bbolker using gmail.com> wrote:

>    As of right now, as far as I can tell, the documentation for the new
> native |> pipe still says that it's experimental.
>
>
> https://github.com/wch/r-source/blob/trunk/src/library/base/man/pipeOp.Rd#L45
>
>       *Pipe support is experimental and may change prior to release.*
>
> Also still in the 4-1 branch:
>
>
> https://github.com/wch/r-source/blob/R-4-1-branch/src/library/base/man/pipeOp.Rd#L45
>
>    (The corresponding comment in the NEWS file has been fixed in the
> last 24 hours, but hasn't propagated to the online/HTML version on the
> developer page yet ...)
>
>    As a "wish list" item, if there are any particularly
> salient/important  differences between the |> pipe and the %>% magrittr
> pipe, it would be great to have those documented (I know that
> documenting the difference between a base-R operator and the one that's
> implemented in a non-Recommended package is a little weird, but it would
> be helpful in this case ...)  I know I could go back to the mailing list
> discussion at
> https://hypatia.math.ethz.ch/pipermail/r-devel/2020-December/080173.html
> and try to figure it out for myself ...
>
>    cheers
>     Ben Bolker
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list