Learn R Programming

sfsmisc (version 1.1-13)

helppdf: help() Type="pdf" and View It

Description

Utility to view PDF-rendered help pages; particularly useful in case they contain mathematical formulas or otherwise sophisticated formats.

Usage

helppdf(topic, viewer = getOption("pdfviewer"), quiet = !interactive(), ...)

Arguments

topic

the topic, passed to help().

viewer

a pdf viewer; the default is typically what you want interactively.

quiet

logical indicating that nothing should be printed to the console and the result should be returned as invisible().

further optional arguments passed to help().

Value

Returns the full path of the pdf file produced.

See Also

help, system.

Examples

Run this code
# NOT RUN {
## Both calls work :
if(interactive()) {
  helppdf(Normal)
  helppdf("NegBinomial")
} else { #  batch mode
  od <- setwd(tempdir())
  ff <- helppdf(Normal, viewer=NULL)
  stopifnot(file.exists(ff))
  setwd(od)# revert to previous dir.
}
# }

Run the code above in your browser using DataLab