Re: [Rd] library path in Rd link

From: Prof Brian Ripley <>
Date: Wed, 14 Nov 2007 21:47:08 +0000 (GMT)

On Wed, 14 Nov 2007, 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.

I think you have misread the manual here:

   There are two other forms of optional argument specified as    \link[pkg]{foo} and \link[pkg:bar]{foo} to link to the package pkg, to    files foo.html and bar.html respectively. These are rarely needed,    perhaps to refer to not-yet-installed packages (but there the HTML    help system will resolve the link at run time) or in the normally    undesirable event that more than one package offers help on a topic    (in which case the present package has precedence so this is only    needed to refer to other packages)

Note: 'rarely needed'.

> 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)?

What OS is this? (As I recall you used Linux last time you posted.)

In any case, on all OSes you will be able to do cross-library links to the base package without having to do anything further (and CRAN packages are full of them). On Unix-alikes the help files are all linked into a single virtual library, and on Windows links to the base package (and a few others) from other libraries are fixed up on installation by (see its help).

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Wed 14 Nov 2007 - 21:49:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 14 Nov 2007 - 22:30:18 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.