From p@u| @end|ng |rom @t@t@@uck|@nd@@c@nz  Fri Sep  2 06:17:37 2022
From: p@u| @end|ng |rom @t@t@@uck|@nd@@c@nz (Paul Murrell)
Date: Fri, 2 Sep 2022 16:17:37 +1200
Subject: [Rd] [External] Re: Pipe operator status, placeholders?
In-Reply-To: <321fe733-62e9-94bb-ff20-8a3daef96d41@gmail.com>
References: <f70c4e1e-468f-abcd-187e-124f8b7a3891@gmail.com>
 <D58C198A-7C19-4E0A-AC78-807293B9182C@gmail.com>
 <3434293-d79-697c-734c-3b3c617a357e@uiowa.edu>
 <321fe733-62e9-94bb-ff20-8a3daef96d41@gmail.com>
Message-ID: <387b44ec-9a5a-6296-13de-499359d535dd@stat.auckland.ac.nz>

Hi

Luke's Ihaka Lecture is now on You Tube ...

https://youtu.be/IMpXB30MP48

Paul

On 2/09/2022 12:12 am, Benjamin Redelings wrote:
> Hi,
> 
> Did you manage to get to a blog post at some point?
> 
> I just saw that there was an live-streaming lecture on August 4th -
> https://sms.wgtn.ac.nz/cgi-bin/seminars?rm=details&id=987 
> <https://sms.wgtn.ac.nz/cgi-bin/seminars?rm=details&id=987>
> 
> Was this perhaps recorded anywhere?
> 
> -BenRI
> 
> 
> On 4/21/22 11:57 AM, luke-tierney at uiowa.edu wrote:
>  > At some point there will probably be a blog post about the design of
>  > the forward pipe operator in base, but that is not something I will
>  > think about until after the current semester is over and my backlog of
>  > other things is cleared.
>  >
>  > Best,
>  >
>  > luke
>  >
>  > On Tue, 19 Apr 2022, peter dalgaard wrote:
>  >
>  >> You probably want Luke Tierney for the full story, but what I gather
>  >> from the deliberations (on the private R-core list), there are issues
>  >> with how non-funcall syntax like lm(....) |> _$coef[2] should work.
>  >> This, in turn, has to do with wanting to have the placeholder occur
>  >> only as a toplevel substitution (i.e. "["("$"(_, coef), 2) is a
>  >> no-go. And the reason for that has to do with the way the pipe works
>  >> in the absense of placeholder, e.g. the parser gets confused by
>  >>
>  >>> x |> f(g(x=_))
>  >> Error in f(x, g(x = "_")) : invalid use of pipe placeholder
>  >>
>  >> -pd
>  >>
>  >>> On 17 Apr 2022, at 01:04 , Benjamin Redelings
>  >>> <benjamin.redelings at gmail.com> wrote:
>  >>>
>  >>> Hi,
>  >>>
>  >>> I see that R 4.2 adds the underscore _ as a placeholder for the new
>  >>> forward pipe operator |> , but only for named arguments. The reason
>  >>> why placeholders for position arguments was NOT added isn't clear to
>  >>> me, so I've been looking for the discussion around the introduction
>  >>> of the placeholder.
>  >>>
>  >>> By searching subject lines in the r-devel mailing list archive, I've
>  >>> found
>  >>>
>  >>> https://stat.ethz.ch/pipermail/r-devel/2021-April/080646.html 
> <https://stat.ethz.ch/pipermail/r-devel/2021-April/080646.html>
>  >>>
>  >>> https://stat.ethz.ch/pipermail/r-devel/2021-January/080396.html 
> <https://stat.ethz.ch/pipermail/r-devel/2021-January/080396.html>
>  >>>
>  >>> https://stat.ethz.ch/pipermail/r-devel/2020-December/080173.html 
> <https://stat.ethz.ch/pipermail/r-devel/2020-December/080173.html> 
> and
>  >>> following messages
>  >>>
>  >>> but not much else.
>  >>>
>  >>> 1. Am I looking in the wrong place?
>  >>>
>  >>> 2. What is the reasoning behind allowing _ as a placeholder only for
>  >>> named arguments?
>  >>>
>  >>> take care,
>  >>>
>  >>> -BenRI
>  >>>
>  >>> ______________________________________________
>  >>> R-devel at r-project.org mailing list
>  >>> https://stat.ethz.ch/mailman/listinfo/r-devel 
> <https://stat.ethz.ch/mailman/listinfo/r-devel>
>  >>
>  >>
>  >
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel 
> <https://stat.ethz.ch/mailman/listinfo/r-devel>

-- 
Dr Paul Murrell
Te Kura Tatauranga | Department of Statistics
Waipapa Taumata Rau | The University of Auckland
Private Bag 92019, Auckland, New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
www.stat.auckland.ac.nz/~paul/



[Rd] [External] Re: Pipe operator status, placeholders?
Paul Murrell