I am wondering it there exists a method to link
to function from other package when I\'m trying to write a documentation for new package using roxygen2
Roxygen2
now also supports documentation written in markdown.
The markdown syntax is for the link is [foo::bar()]
which is translated to
\code{\link[foo:bar]{foo::bar()}}
in the generated .Rd file. (See Roxygen2 vignette.)
Note that you may need to specifically turn on Markdown support by writing Roxygen: list(markdown = TRUE)
in your DESCRIPTION
file, or by putting an #' @md
comment if you want to enable markdown only for a specific man page. This is also explained at the very top of the linked vignette. (Thanks to @Tjebo for the comment)
Note that there are two colons in the markdown version whereas there is only one colon in the Rd version.