From |kry|ov @end|ng |rom d|@root@org  Thu Feb  6 16:18:12 2025
From: |kry|ov @end|ng |rom d|@root@org (Ivan Krylov)
Date: Thu, 6 Feb 2025 18:18:12 +0300
Subject: [Rd] Depends: R (>= 4.1) for packages that use |> and \(...)
In-Reply-To: <26514.5904.863904.292546@hornik.net>
References: <20250116144121.5520a9cc@arachnoid>
 <CAFDcVCTTVa+Ea+BoVoag0RJ7LK3P1tyPzBG9vP4U-4w6a4kKKQ@mail.gmail.com>
 <26506.26949.241762.7373@hornik.net>
 <26509.10892.521351.954386@hornik.net>
 <26512.37984.542732.125792@hornik.net>
 <CAP8nD2xthJ5TzwYdok5tjXiWyf4=Y=uGf-sf7FFQKCjzNAACOA@mail.gmail.com>
 <20250123121008.4338cff0@Tarkus>
 <26514.5904.863904.292546@hornik.net>
Message-ID: <20250206181812.5155d6ed@arachnoid>

On Thu, 23 Jan 2025 11:16:48 +0100
Kurt Hornik <Kurt.Hornik at wu.ac.at> wrote:

> My guess would be that the new syntax is particularly prominently used
> in examples: if so, it would be good to also have coverage for this.

In today's CRAN snapshot, there turned out to be 198 packages that use
4.1 syntax in examples but not in code, 5 packages that use 4.2 syntax
in examples but 4.1 in the code, and 3 packages that use 4.2 syntax in
examples but not the code. This may be slightly imprecise because I
don't have some of the Rd macro packages installed and run
Rd2ex(stages=NULL) on manually-parsed Rd files without installing the
packages.

Attaching a patch that checks the syntax used in Rd examples at the
same time as the main R code, not necessarily the best way to perform
this check. Is it perhaps worth separating R/* checks from man/*.Rd
checks? Should R CMD check try to reuse the Rd database from the
installed copy of the package?

-- 
Best regards,
Ivan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_R_syntax_in_examples.patch
Type: text/x-patch
Size: 4000 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20250206/9fd89fa8/attachment.bin>


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