[R-pkg-devel] Rd cross-references to Suggested package

Joshua Ulrich jo@h@m@u|r|ch @end|ng |rom gm@||@com
Mon Oct 10 22:12:21 CEST 2022


Hi all,

I'd like to link to a help page of a package in my package's Suggests.
WRE, section 2.5 says,

"Historically (before R version 4.1.0), links of the form
\link[pkg]{foo} and \link[pkg:bar]{foo} used to be interpreted as
links to files foo.html and bar.html in package pkg, respectively. For
this reason, the HTML help system looks for file foo.html in package
pkg if it does not find topic foo, and then searches for the topic in
other installed packages. To test that links work both with both old
and new systems, the pre-4.1.0 behaviour can be restored by setting
the environment variable _R_HELP_LINKS_TO_TOPICS_=false.

"Packages referred to by these ‘other forms’ should be declared in the
DESCRIPTION file, in the ‘Depends’, ‘Im
ports’, ‘Suggests’ or ‘Enhances’ fields."

This seems to imply that it's possible... though I don't understand
when I need to set _R_HELP_LINKS_TO_TOPICS_=false in order to test
that the link is done correctly. I'm using \link[pkg]{foo} in R 4.2.1.

I ran R CMD build/INSTALL/check with and without that env var set to
false. Both times the suggested package was not installed on my
library path, so I had to set _R_CHECK_FORCE_SUGGESTS_=false for R CMD
check --as-cran.

I didn't notice a difference in output from R CMD check. Both runs had:

    * checking Rd cross-references ... NOTE
    Package unavailable to check Rd xrefs: ‘timeSeries’

I'd appreciate any thoughts and/or pointers to other documentation.

Best,
Josh


-- 
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com



More information about the R-package-devel mailing list