[R-pkg-devel] Recent dev version of R CMD check fails when a package function named X also has a parameter named X

Markus Jochim m@rku@joch|m @end|ng |rom phonet|k@un|-muenchen@de
Mon Oct 30 17:12:50 CET 2023


Hi R people,

I am the maintainer of the emuR package and I am having a problem with 
recent versions of R CMD check.

CRAN‘s r-devel test suites [1] have started to emit a NOTE about the 
HTML version of the manual:

> Version: 2.4.1
> Check: HTML version of manual
> Result: NOTE
>     Found the following HTML validation problems:
>     query.html:50:9 (query.Rd:22): Warning: <code> anchor "query" 
> already defined
> Flavors: r-devel-linux-x86_64-debian-clang, 
> r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, 
> r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
>
This is caused by one of my package’s functions that is named query and 
also has a parameter named query.

I think I have tracked this down to SVN revision r85407 of R. With 
earlier versions:

R CMD Rdconv -t html query.Rd

would output (line 50, as referenced by the NOTE):

<tr><td><code id="query_:_query">query</code></td>

But newer versions output:

<tr><td><code id="query">query</code></td>

Notice the difference in id. The id "query" appears both here and 
further up in the file, specifically in the h2 heading. This triggers 
the HTML validation problem. I suppose this is a bug in the experimental 
table of contents feature? As such, should I rather post this to R-devel?

Unfortunately, this also prevents me from uploading a new version of my 
package, since it does not get past CRAN’s automatic pretest. Can I 
resubmit my new version and simply state in the comments that I cannot 
fix the NOTE from r-devel at this point? Or should I rather wait until 
this is changed upstream? (the described NOTE is the only complaint from 
the pretest). Changing the function or parameter name is not an option, 
they have been used in this package ever since it was released a couple 
of years ago.

This NOTE can also be reproduced with a minimal R package that has 
nothing but a hello function with a parameter named hello.

Thanks for reading this. I appreciate any help.

Markus


Institute for Phonetics and Speech Processing

Ludwig-Maximilians-Universität München

https://www.phonetik.uni-muenchen.de


[1] https://cran.rstudio.com//web/checks/check_results_emuR.html




More information about the R-package-devel mailing list