View source: R/PrintPackageHelp.R
PrintPackageHelp | R Documentation |
Print the HTML code associated with the help documentation of one or more R packages.
PrintPackageHelp( pkg, file = "", internal = FALSE, toc = FALSE, title_to_name = FALSE, notrun = TRUE, sep = "<hr>", links = pkg, ... )
pkg |
'character' vector. Package name(s) |
file |
'connection' or 'character' string. Names the file to append output to. Prints to the standard output connection by default. |
internal |
'logical' flag. Whether to print help topics flagged with the keyword “internal”. |
toc |
'logical' flag.
Whether to format level-2 headers (help-topic titles) using a Markdown syntax.
This is required when specifying the table-of-contents (toc) format option in R Markdown,
see |
title_to_name |
'logical' flag. Whether to replace the help-topic “title” with its “name”. |
notrun |
'logical' flag.
Whether to include |
sep |
'character' string. HTML to separate help topics, a horizontal line by default. |
links |
'character' vector. Names of packages searched (level 0) when creating internal hyperlinks to functions and datasets. |
... |
Not used |
Invisible NULL
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
## Not run: cat("---", "title: \"Help Documentation\"", "output:", " html_document:", " toc: true", " toc_float: true", "---", sep = "\n", file = "test-help.Rmd") PrintPackageHelp("inlmisc", file = "test-help.Rmd", toc = TRUE, title_to_name = TRUE, notrun = FALSE) rmarkdown::render("test-help.Rmd") url <- file.path("file:/", getwd(), "test-help.html") utils::browseURL(url) file.remove("test-help.Rmd", "test-help.html") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.