Skip to content
Prev 5873 / 12125 Next

[R-pkg-devel] Package Anchored Links with R-Dev

On 09/08/2020 3:15 p.m., Ben Bolker wrote:
To link to "?utils::dump.frames", you need to construct a URL that leads 
to the HTML file containing that help page on static builds of the help 
system.

If utils is available, no problem, just look up the fact that the page 
you want is debugger.html at the time you construct the link.  But it 
was documented that such links should work even if the target package 
was not available at the time the link was being made.  So you need a 
link that you are sure will be available when the referenced package is 
eventually installed.  Obviously that's going to be brittle.

Perhaps the new requirement that referenced packages be mentioned in the 
DESCRIPTION file is a step towards addressing this.  If everything 
that's referenced is present when the help system is being built, there 
will be an easy solution.

Nowadays, it would probably be reasonable to put in stub pages for every 
alias, so that when you try to load dump.frames.html, the page itself 
redirects you to debugger.html.  Or maybe you could just have a single 
page in each package that handles aliases via Javascript.

Or R could just no longer support static copies of the help system.

When you are using dynamically generated help pages, the link can be 
resolved by the server, and that's why those links have appeared to work 
for so long, even though the requirement to link to the filename instead 
of the alias has been there since before I wrote the dynamic help server.

Duncan Murdoch