[R] [Rd] How to link to vignette from .Rd file
Duncan Murdoch
murdoch at stats.uwo.ca
Thu Nov 9 19:25:49 CET 2006
On 11/9/2006 1:15 PM, Agner Fog wrote:
> Duncan Murdoch wrote:
>
>> Actually how you built the .pdf is irrelevant, but it does look for
>> file with the same name and one of these extensions:
>>
>> "Rnw" "rnw" "Snw" "snw" "Rtex" "rtex" "Stex" "stex"
>>
>> So you could just create a zero length file with the same basename and
>> one of those extensions, and it should work.
>>
>> I don't know if this restriction is intentional.
>
> I wouldn't rely on this hack working in future versions. What if it
> creates an empty pdf file from the zero-length Rnw file or deletes the
> pdf file for the reason that the Rnw file is invalid. It is better to
> make the system recognize pdf files than to rely on dirty undocumented
> hacks, IMHO.
Actually this is documented to work. R doesn't assume it can build a
vignette, so if you supply a .pdf in your source package, it will use
that rather than trying to build one.
More information about the R-help
mailing list