PrintPackageHelp: Print Package Help Documentation

Description Usage Arguments Value Author(s) Examples

View source: R/PrintPackageHelp.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
PrintPackageHelp(
  pkg,
  file = "",
  internal = FALSE,
  toc = FALSE,
  title_to_name = FALSE,
  notrun = TRUE,
  sep = "<hr>",
  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

Author(s)

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## 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)

inlmisc documentation built on Jan. 25, 2022, 1:14 a.m.