Skip to content

Instantly share code, notes, and snippets.

@yihui
Created October 9, 2012 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yihui/3856789 to your computer and use it in GitHub Desktop.
Save yihui/3856789 to your computer and use it in GitHub Desktop.
make static html help for all R packages
makeStaticHTMLHelp <- function(libs = .libPaths()) {
make.packages.html(lib.loc = libs)
links <- findHTMLlinks()
for (lib in libs) {
message('* Generating static HTML for packages in library ', lib)
for (pkg in rownames(installed.packages(lib))) {
message('** package', pkg)
pkgRdDB <- tools:::fetchRdDB(file.path(lib, pkg, 'help', pkg))
for (key in names(pkgRdDB)) {
Rd2HTML(pkgRdDB[[key]],
out = file.path(lib, pkg, 'html', paste(key, 'html', sep = '.')),
package = pkg, Links = links, no_links = is.null(links), stages = 'render')
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment