Reputation: 1629
So, I'd like to reference one of my package vignettes inside the roxygen2 comments of a function but I'm having a hard time understanding how to do it.
More generally, how do we reference documents inside /inst/doc
? E.g. I'd like to reference /inst/doc/mypdf.pdf
inside the roxygen2 comments for myFunc
. What would that look like? Is it even possible?
Upvotes: 20
Views: 2646
Reputation: 903
I know this is 4 years old...and hadley provided the answer...but I'd like to offer another option:
\href{../doc/help.html}{\code{vignette("help", package = "mypkg")}}
This gives a direct link to opening the vignette, and provides the code to show the user how to open it on their own.
Upvotes: 14
Reputation: 103928
I just tell people to run the code that opens the vignette:
#' For more details see the help vignette:
#' \code{vignette("help", package = "mypkg")}
Upvotes: 17