Minor modification The function of Yihui Xie to create static HTML help pages for R packages , so that it creates static pages in the html directory of the package.
static_help = function(pkg, links = tools::findHTMLlinks()) { wd <- getwd() helpdir <- system.file('html', package = "tradeflows") setwd(helpdir) message("Generated help files will be placed in ", helpdir) pkgRdDB = tools:::fetchRdDB(file.path(find.package(pkg), 'help', pkg)) force(links); topics = names(pkgRdDB) for (p in topics) { tools::Rd2HTML(pkgRdDB[[p]], paste(p, 'html', sep = '.'), package = pkg, Links = links, no_links = is.null(links)) } setwd(wd)
To use it for your package in development:
static_help("my_package_name")
You will need to re-run this function every time you create a package.
source share