p_html: HTML Help Page, PDF Manual and Vignettes

View source: R/p_html.R

p_htmlR Documentation

HTML Help Page, PDF Manual and Vignettes

Description

p_page opens the default browser, connects to your local CRAN and displays the home page of the package(s). An internet connexion is required.

p_html and p_html2 open the default browser and display the html help page of the package, if it is installed. On Windows, p_html returns a local server address http://127.0.0.1:*.html and subfunctions listed in the page can be explored whereas p_html2 returns a file address file:///C:/*.html with no links to the subfunctions.

p_htmlweb opens the default browser and displays the html help pages stored by the R-project at https://search.r-project.org. An internet connexion is required.

p_pdf displays in a pdf reader the pdf manual of the package, or generates it on the fly in the current directory if the package is installed. Miktex or Texlive is required. This is a very fast function if the files already exist (and overwrite= FALSE) and a (relatively) slow function if the files needs to be generated, usually much slower than:

p_pdfweb downloads from you local CRAN the pdf manual of the package, saves it in the current directory and opens it in the pdf application of your browser. An internet connexion is required.

p_vig is a wrapper of utils::browseVignettes. It opens the default browser and displays a list of the vignettes related to a package, if they exist.

p_vig_all wraps utils::browseVignettes(NULL). It opens the default browser and displays all vignettes available in the computer. This can be a very large html file.

Use p_archive or p_archive to display in the browser or in the console the package archives. An internet connexion is required.

Usage

p_page(..., char = NULL, repos = getOption("repos")[1])

p_html(..., char = NULL)

p_html2(..., char = NULL)

p_htmlweb(..., char = NULL)

p_pdf(..., char = NULL, overwrite = FALSE, dir = ".")

p_pdfweb(..., char = NULL, repos = getOption("repos")[1])

p_vig(..., char = NULL)

p_vig_all()

Arguments

...

any format recognized by cnsc, except list. A vector of packages.

char

(name to) a character vector. Use this argument if ... fails or if you call the function from another function. If used, argument ... is ignored.

repos

character. The address of your local CRAN.

overwrite

logical. Overwrite already existing file (and use LaTeX intensively).

dir

character. The directory in which the files are read or written. Default value "." is the current directory.

Examples

if (interactive()) {
p_page(RWsearch, sos, repos = "https://cloud.r-project.org")
p_html(RWsearch, sos)
p_htmlweb(RWsearch)
p_pdfweb(sos, repos = "https://cloud.r-project.org")

## Try
p_pdf(sos, dir = file.path(tempdir(), "ppdf"))
p_vig(RWsearch)
}

RWsearch documentation built on May 29, 2024, 6:42 a.m.