From ripley at stats.ox.ac.uk  Tue Feb  8 08:18:28 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue Feb  8 08:18:40 2005
Subject: [Rd] link to an alias in another package
In-Reply-To: <4208243C.4080605@bank-banque-canada.ca>
References: <4208243C.4080605@bank-banque-canada.ca>
Message-ID: <Pine.LNX.4.61.0502080710390.14407@gannet.stats>

On Mon, 7 Feb 2005, Paul Gilbert wrote:

> In some documentation for a package I am working on I have
>
>>    \code{\link[stats]{varimax}}
>>    \code{\link[stats]{promax}}
>
> The link to varimax works, but not the one to promax. Promax is an alias 
> under \name{varimax}. This kind of link works within a package, but I'm not 
> sure if it is suppose to work when it is a link to another package. Is this a 
> known limitation or bug, or something I should explore more carefully?

Definitely the latter!  Don't include [stats] (why are you including it?), 
or do read the documentation in R-exts:

   There are optional arguments specified as \link[pkg]{foo} and
   \link[pkg:bar]{foo} to link to the package pkg with topic (file?)
   foo and bar respectively.

so you need \code{\link[stats:varimax]{promax}}. Note the difference 
between `topic' and `alias' here.

You only need the [] to disambiguate crossreferences, or to refer to 
packages that might not yet be installed, which does not apply to [stats].

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] link to an alias in another package
Prof Brian Ripley