Re: [R-pkg-devel] Native pipe in package examples

2024-01-27 Thread Jon Harmon
See https://github.com/r-lib/httr2/blob/main/configure and https://github.com/r-lib/httr2/blob/main/tools%2Fexamples.R (and https://r-pkgs.org/misc.html#sec-misc-tools if you're not sure what you're looking at). They use a build-time script to change the examples. It looks like it just puts a hea

Re: [R-pkg-devel] Native pipe in package examples

2024-01-26 Thread Duncan Murdoch
On 25/01/2024 12:38 p.m., Henrik Bengtsson wrote: On Thu, Jan 25, 2024 at 8:27 AM Duncan Murdoch wrote: On 25/01/2024 11:18 a.m., Henrik Bengtsson wrote: On Thu, Jan 25, 2024 at 7:48 AM Duncan Murdoch wrote: On 25/01/2024 10:27 a.m., Josiah Parry wrote: Hey all, I've encountered use of t

Re: [R-pkg-devel] Native pipe in package examples

2024-01-26 Thread Serguei Sokol
Le 26/01/2024 à 10:44, Serguei Sokol a écrit : Le 26/01/2024 à 10:31, Serguei Sokol a écrit : Le 25/01/2024 à 19:04, Berwin A Turlach a écrit : On Thu, 25 Jan 2024 09:44:26 -0800 Henrik Bengtsson wrote: On Thu, Jan 25, 2024 at 9:23 AM Berwin A Turlach wrote: G'day Duncon, Uups, apologie

Re: [R-pkg-devel] Native pipe in package examples

2024-01-26 Thread Serguei Sokol
Le 26/01/2024 à 10:31, Serguei Sokol a écrit : Le 25/01/2024 à 19:04, Berwin A Turlach a écrit : On Thu, 25 Jan 2024 09:44:26 -0800 Henrik Bengtsson wrote: On Thu, Jan 25, 2024 at 9:23 AM Berwin A Turlach wrote: G'day Duncon, Uups, apologies for the misspelling of your name Duncan. Finge

Re: [R-pkg-devel] Native pipe in package examples

2024-01-26 Thread Serguei Sokol
Le 25/01/2024 à 19:04, Berwin A Turlach a écrit : On Thu, 25 Jan 2024 09:44:26 -0800 Henrik Bengtsson wrote: On Thu, Jan 25, 2024 at 9:23 AM Berwin A Turlach wrote: G'day Duncon, Uups, apologies for the misspelling of your name Duncan. Fingers were too fast. :) [...] But you could alwa

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Berwin A Turlach
On Thu, 25 Jan 2024 09:44:26 -0800 Henrik Bengtsson wrote: > On Thu, Jan 25, 2024 at 9:23 AM Berwin A Turlach > wrote: > > > > G'day Duncon, Uups, apologies for the misspelling of your name Duncan. Fingers were too fast. :) [...] > > But you could always code your example (not tested :-) ) al

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Henrik Bengtsson
On Thu, Jan 25, 2024 at 9:23 AM Berwin A Turlach wrote: > > G'day Duncon, > > On Thu, 25 Jan 2024 11:27:50 -0500 > Duncan Murdoch wrote: > > > On 25/01/2024 11:18 a.m., Henrik Bengtsson wrote: > [...] > > I think you're right that syntax errors in help page examples will be > > installable, but I

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Henrik Bengtsson
On Thu, Jan 25, 2024 at 8:27 AM Duncan Murdoch wrote: > > On 25/01/2024 11:18 a.m., Henrik Bengtsson wrote: > > On Thu, Jan 25, 2024 at 7:48 AM Duncan Murdoch > > wrote: > >> > >> On 25/01/2024 10:27 a.m., Josiah Parry wrote: > >>> Hey all, > >>> > >>> I've encountered use of the native pipe ope

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Berwin A Turlach
G'day Duncon, On Thu, 25 Jan 2024 11:27:50 -0500 Duncan Murdoch wrote: > On 25/01/2024 11:18 a.m., Henrik Bengtsson wrote: [...] > I think you're right that syntax errors in help page examples will be > installable, but I don't think there's a way to make them pass "R CMD > check" other than w

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Duncan Murdoch
On 25/01/2024 11:44 a.m., Josiah Parry wrote: The package of course passes R CMD check otherwise it wouldn’t be on CRAN! (: CRAN doesn't run checks using R 3.6.0. The package claims it works there, and maybe it will, but it won't pass R CMD check. Duncan Murdoch Thank you Henrik! Good t

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Josiah Parry
The package of course passes R CMD check otherwise it wouldn’t be on CRAN! (: Thank you Henrik! Good to know my intuition was correct. I’m glad we can start to use the new features of R in package documentation :) On Thu, Jan 25, 2024 at 11:27 Duncan Murdoch wrote: > On 25/01/2024 11:18 a.m., H

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Duncan Murdoch
On 25/01/2024 11:18 a.m., Henrik Bengtsson wrote: On Thu, Jan 25, 2024 at 7:48 AM Duncan Murdoch wrote: On 25/01/2024 10:27 a.m., Josiah Parry wrote: Hey all, I've encountered use of the native pipe operator in the examples for 'httr2' e.g. request("http://example.com";) |> req_dry_run()

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Henrik Bengtsson
On Thu, Jan 25, 2024 at 7:48 AM Duncan Murdoch wrote: > > On 25/01/2024 10:27 a.m., Josiah Parry wrote: > > Hey all, > > > > I've encountered use of the native pipe operator in the examples for > > 'httr2' e.g. > > > > request("http://example.com";) |> req_dry_run() > > > > > > Since r-oldrel (acc

Re: [R-pkg-devel] Native pipe in package examples

2024-01-25 Thread Duncan Murdoch
On 25/01/2024 10:27 a.m., Josiah Parry wrote: Hey all, I've encountered use of the native pipe operator in the examples for 'httr2' e.g. request("http://example.com";) |> req_dry_run() Since r-oldrel (according to rversions::r_oldrel()) is now 4.2.3, can the native pipe be used in example cod