Skip to content
Prev 3241 / 12125 Next

[R-pkg-devel] creating a link to a vignette in a .Rd file

Dear Hadley,

You're right -- my approach was flawed and the document doesn't open even when the file URL is hard-coded in the .Rd file. With that hint, I found the following solution:

	\href{../doc/partial-residuals.pdf}{partial-residuals vignette}

This works and passes package checking. A caveat: I tried it only under Windows, both inside and outside of RStudio. I'll follow up on macOS and Linux and report if there are problems.

I'm surprised that this question hasn't arisen more frequently -- wanting to link to vignettes from help pages seems natural to me. I found a couple of queries in a web search but no solution. 

Thanks for this,
 John