Skip to contents

print_help() prints the help page of a function to the console, or into a knitr document, as text, HTML, LaTeX, or Rd.

Usage

print_help(
  topic,
  format = c("text", "html", "latex", "Rd"),
  lines = NULL,
  before = NULL,
  after = NULL
)

Source

https://www.r-bloggers.com/2013/06/printing-r-help-files-in-the-console-or-in-knitr-documents/

Arguments

topic

The name of the function or help topic, as a character string or unquoted.

format

The format to print the help page in, one of "text" (the default), "html", "latex", or "Rd".

lines

An optional integer vector that selects the lines to print.

before, after

Optional character vectors to print before or after the help page.

Value

The lines of the help page, invisibly.

Examples

print_help("depends", lines = 1:5)
#> _L_o_a_d_i_n_g _p_a_c_k_a_g_e_s
#> 
#> _D_e_s_c_r_i_p_t_i_o_n:
#> 
#>      Function for loading and, if necessary, installing packages