From murdoch.duncan at gmail.com  Mon Oct 19 03:18:38 2015
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Sun, 18 Oct 2015 21:18:38 -0400
Subject: [Rd] Linking to documentation from a vignette using markdown?
In-Reply-To: <56241474.7020203@prodsyse.com>
References: <56241474.7020203@prodsyse.com>
Message-ID: <562444EE.7010900@gmail.com>

On 18/10/2015 5:51 PM, Spencer Graves wrote:
> Hello:
> 
> 
>        What's the preferred way to link to package documentation from a 
> vignette using markdown?
> 
> 
>        My current draft includes 
> "[cumsum](https://stat.ethz.ch/R-manual/R-devel/library/base/html/cumsum.html)" 
> to link to the help page for cusum{base} and 
> "[KFAS](https://rweb.crmda.ku.edu/cran/web/packages/KFAS/KFAS.pdf)" to 
> link to the pdf documentation for the KFAS package.  This works, but it 
> feels like an ugly hack, and I wonder if there might be some more 
> elegant way of doing this (documented in a fine manual I have yet to find)?

You can include links that work only when R is displaying the help using
relative URLs like

../../base/help/cumsum

or

../../base/html/cumsum.html

(The former is like doing ?cumsum, i.e. it uses the alias; the latter
goes directly to a page by its name.)

The advantage of this kind of link is it doesn't need an Internet
connection, it works with the R help system; the disadvantage is that it
only works when the help system is running, so those links won't work in
the copy of your vignette on CRAN, for example.

Duncan Murdoch



[Rd] Linking to documentation from a vignette using markdown?
Duncan Murdoch