1% Generated by roxygen2: do not edit by hand 2% Please edit documentation in R/utils-rd2html.R 3\name{knit_rd} 4\alias{knit_rd} 5\alias{knit_rd_all} 6\title{Knit package documentation} 7\usage{ 8knit_rd(pkg, links = tools::findHTMLlinks(), frame = TRUE) 9 10knit_rd_all() 11} 12\arguments{ 13\item{pkg}{Package name.} 14 15\item{links}{A character vector of links to be passed to 16\code{tools::\link{Rd2HTML}()}.} 17 18\item{frame}{Boolean: whether to put a navigation frame on the left of the 19index page.} 20} 21\value{ 22All HTML pages corresponding to topics in the package are written 23 under the current working directory. An \file{index.html} is also written 24 as a table of content. 25} 26\description{ 27Run examples in a package and insert output into the examples code; 28\code{knit_rd_all()} is a wrapper around \code{knit_rd()} to build static 29HTML help pages for all packages under the \file{html} directory of them. 30} 31\note{ 32Ideally the html pages should be put under the \file{html} directory of 33 an installed package which can be found via \code{system.file('html', 34 package = 'your_package_name')}, otherwise some links may not work (e.g. 35 the link to the DESCRITION file). 36} 37\examples{ 38library(knitr) 39\dontrun{ 40 41knit_rd("maps") 42knit_rd("rpart") 43setwd(system.file("html", package = "ggplot2")) 44knit_rd("ggplot2") # time-consuming! 45 46knit_rd_all() # this may take really long time if you have many packages installed 47} 48} 49