knit_rd: Knit package documentation

Description Usage Arguments Value Note Examples

View source: R/utils-rd2html.R

Description

Run examples in a package and insert output into the examples code; knit_rd_all() is a wrapper around knit_rd() to build static HTML help pages for all packages under the ‘html’ directory of them.

Usage

1
2
3

Arguments

pkg

Package name.

links

A character vector of links to be passed to Rd2HTML.

frame

Boolean: whether to put a navigation frame on the left of the index page.

Value

All HTML pages corresponding to topics in the package are written under the current working directory. An ‘index.html’ is also written as a table of content.

Note

Ideally the html pages should be put under the ‘html’ directory of an installed package which can be found via system.file('html', package = 'your_package_name'), otherwise some links may not work (e.g. the link to the DESCRITION file).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(knitr)
## Not run: 

knit_rd("maps")
knit_rd("rpart")
setwd(system.file("html", package = "ggplot2"))
knit_rd("ggplot2")  # time-consuming!

knit_rd_all()  # this may take really long time if you have many packages installed

## End(Not run)

yihui/knitr documentation built on Dec. 11, 2018, 3:41 a.m.