Learn R Programming

inlmisc (version 0.5.5)

PrintPackageHelp: Print Package Help Documentation

Description

Print the HTML code associated with the help documentation of one or more R packages.

Usage

PrintPackageHelp(
  pkg,
  file = "",
  internal = FALSE,
  toc = FALSE,
  title_to_name = FALSE,
  notrun = TRUE,
  sep = "
", links = pkg, ... )

Arguments

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 rmarkdown::render function for details.

title_to_name

'logical' flag. Whether to replace the help-topic “title” with its “name”.

notrun

'logical' flag. Whether to include ## Not run comments in the Examples section of help documentation.

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

Value

Invisible NULL

Examples

Run this code
# 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")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab