Learn R Programming

packagedocs (version 0.4.0)

rd_link: Translate a reference to a package function into a link to that function's documentation in rd.html

Description

This is meant to be used inside your packagedocs vignette docs.Rmd and rd.Rmd files

Usage

rd_link(txt, rd_html = rd_file_html(), pkg = ".")

Arguments

txt

a string or expression referencing a function or other Rd object

rd_html

the string to be used in the href string pointing to the page where Rd documentation is provided

pkg

path to package being documented. Works when within sub-package directories

Details

Instead of using `myfunction()` when talking about a package function myfunction inside your .Rmd file, you can use `r rd_link(myfunction())` or even things like `r rd_link(myfunction(arg1 = 1, ...))` and it will turn it into an href pointing to the online documentation of your package function myfunction in the page rendered by packagedocs.