[R-pkg-devel] Check: Rd \usage sections, Result: The \usage entries for S3 methods should use the \method markup and not their full name.

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Wed Mar 22 09:51:14 CET 2023


On Tue, 21 Mar 2023 23:08:43 +0100
Yohann Foucher <yohann.foucher using univ-poitiers.fr> wrote:

> Check: Rd \usage sections, Result: NOTE
>  S3 methods shown with full name in documentation object 'nnet.time':
>    'nnet.time'
> 
>  The \usage entries for S3 methods should use the \method markup and
> not their full name.

I have downloaded your package from the CRAN FTP server (under
incoming/archived) and took a look at it. This NOTE is about the
nnet.time function itself (documented in man/nnet.time.Rd), which R CMD
check mistakenly took for a nnet() method on class "time".

This is a problem because you import nnet::nnet, which is an S3
generic, and R is slowly migrating its behaviour in cases like this.
Previously, calling nnet::nnet(structure(..., class = 'time')) would
mistakenly call your nnet.time function, despite it's not intended to
be an S3 method. The idea is to only call S3 methods when they are
registered as such (so, don't call nnet.time in this case), but this
requires writing tests and identifying every case of this pattern
working by mistake. Your nnet.time function is a false positive for
such a test.

It's hard to decide what to do next. Your users would prefer nnet.time
to keep working (so you can't just rename it, especially if you have
other packages depending on it), and CRAN would prefer nnet.time to keep
being not-an-S3-method, but right now it's causing you a NOTE due to
its name.

Did the rejection e-mail say whether you can reply-to-all /
reply-to-sender and explain it's a false positive? Even if you decide
to rename nnet.time and everything else, it would still need to spend
at least one release on CRAN as a deprecated function.

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list