[Rd] library path in Rd link

Duncan Murdoch murdoch at stats.uwo.ca
Wed Nov 14 22:36:15 CET 2007


On 11/14/2007 8:49 AM, Adrian Dusa wrote:
> Dear all,
> 
> When creating new functions in a package, there is a "See also" component in 
> the Rd file.
> Usually one uses \link{otherfun}, if the other function is from the same 
> package, or \link[otherpackage]{otherfun} otherwise.
> 
> The trouble is that I install new packages not in the default R library 
> folder, but into some other subfolder in my home, so the link searches 
> for "otherpackage" in my home subfolder.
> 
> Is there a method to create links to functions from the base package, for 
> example (which is installed by default in the normal library folder)?

I believe this is normally automatic in platforms other than Windows. 
On Windows, the answer is no.

The problem is that in most cases R isn't in charge of the help file 
viewing.  There isn't a good way to make a link from an HTML file to a 
location that isn't known in advance, for example.

On Unix-alikes, the workaround is to build soft links to all the 
packages in a standard location; but soft links don't work on Windows 
(and we don't want to get into the almost-undocumented hard links that 
exist on some Windows file systems).

Duncan Murdoch



More information about the R-devel mailing list