From ggrothend|eck @end|ng |rom gm@||@com  Tue Dec  8 22:23:30 2020
From: ggrothend|eck @end|ng |rom gm@||@com (Gabor Grothendieck)
Date: Tue, 8 Dec 2020 16:23:30 -0500
Subject: [Rd] [External] Re: New pipe operator
In-Reply-To: <CAP01uRmd0tRM4xYnegK=YijJv6htqq+fuOwBMBns--0+2a7Opw@mail.gmail.com>
References: <e55c2093-0bb5-5f9b-5521-0ca8bdf35953@gmail.com>
 <CALyqOb8c1hHOSaMV+fqXTwpeOsP--KJ_t-oeqMYYafVXeNpqZg@mail.gmail.com>
 <7586e034-e287-0970-6480-f82d747b5445@gmail.com>
 <CADfFDC7bT58_+52uvmpHuMMQRNbbmqV3_7t_fc4sgJ_Esw=xag@mail.gmail.com>
 <CAJmOi+PO_8XDC23=rT=pQ76ENL=gx2V-41ax2fHSVs87xURcEA@mail.gmail.com>
 <alpine.DEB.2.21.2012051203250.3003@luke-Latitude-7480>
 <CAP01uRmd0tRM4xYnegK=YijJv6htqq+fuOwBMBns--0+2a7Opw@mail.gmail.com>
Message-ID: <CAP01uRmjHcduh8ugqaNK-qA5HGh-GvaqbbbuFdnjBbymU+bpWg@mail.gmail.com>

On Mon, Dec 7, 2020 at 9:09 AM Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
>
> On Sat, Dec 5, 2020 at 1:19 PM <luke-tierney at uiowa.edu> wrote:
> > Let's get some experience
>
> Here is my last SO post using dplyr rewritten to use R 4.1 devel.  Seems

It occurred to me it would also be interesting to show this example
rewritten using John Mount's bizarro pipe
(which is clever use of syntax to get the effect of a pipe) with the
new \(x) ...
This can be done entirely in base R 4.1.  It does not use \>, just \(x)...

  "myfile.csv" ->.;
    readLines(.) ->.;
    gsub(r'{(c\(.*?\)|integer\(0\))}', r'{"\1"}', .) ->.;
    read.csv(text = .) ->.;
    replace(., 2:3, lapply(.[2:3], \(col) lapply(col, \(x)
eval(parse(text = x))))) ->.;
    . -> DF



[Rd] [External] Re: New pipe operator
Gabor Grothendieck