[Rd] Depends: R (>= 4.1) for packages that use |> and \(...)

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Wed Mar 5 16:49:01 CET 2025


В Wed, 5 Mar 2025 07:47:04 -0600
Hadley Wickham <h.wickham using gmail.com> пишет:

> Unfortunately your test generates a false positive for httr2 (
> https://cran.r-project.org/web/checks/check_results_httr2.html) and
> other tidyverse packages where we use the base pipe in examples, but
> carefully disable them for older versions of R.

Please accept my apologies. Indeed, the script [1] called at
configuration time does replace the examples section to avoid parse
errors for example(...). And having example() do nothing (with all code
and an explanation in the help page) is a small cost for having the
rest of the package work on R versions as old as 3.5.

I don't see a way to take this into account, since the workaround is
completely invisible to sufficiently new versions of R. It might be
that the best way forward is to revert the Rd example check.

-- 
Best regards,
Ivan

[1] https://github.com/r-lib/httr2/blob/main/tools/examples.R



More information about the R-devel mailing list