Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Non-file package-anchored link(s) in documentation object

In my R package checking, I got some warnings about documentation links.

* checking Rd cross-references ... WARNING
Non-file package-anchored link(s) in documentation object 'show_sig_consensusmap.Rd':
  ‘[NMF:consensusmap]{NMF::consensusmap}’

Non-file package-anchored link(s) in documentation object 'show_sig_number_survey2.Rd':
  ‘[NMF]{summary}’

It is strange that such warnings only happen in debian OS.

package sigminer_1.0.7.tar.gz does not pass the incoming checks automatically, please see the following pre-tests:
Windows: <https://win-builder.r-project.org/incoming_pretest/sigminer_1.0.7_20200616_163758/Windows/00check.log>
Status: OK
Debian: <https://win-builder.r-project.org/incoming_pretest/sigminer_1.0.7_20200616_163758/Debian/00check.log>
Status: 1 WARNING

I can only remove this warning by deleting the links. But after deletion, my users will not be able to get more info by clicking the link.

enter image description here

Is there a better solution?

like image 820
Shixiang Wang Avatar asked Jun 17 '20 02:06

Shixiang Wang


1 Answers

It seems that, if you use links of the form \code{\link[pkg]{foo}} pointing to help pages containing several functions, the link should point only to the core function.

For example, say the functions foo_1 and foo_2 are described in the same help page and foo_1 is the main function (i.e. appearing in the top left corner of the help page).

To create a link to foo_2, you should use \code{\link[pkg:foo_1]{foo_2}}.

See this GH issue and this reference in writing R extensions.

like image 102
Laurent Bergé Avatar answered Nov 17 '22 22:11

Laurent Bergé