[ top | up ]

Online Documentation

Syntax

help(topic, data, package = .library(), lib.loc = .lib.loc)

?name
?data(name)
?package(name)
?library(lib.loc)

Arguments

topic, name A name or character string on which documentation is desired.
data A name or character string specifying a data set on which information is sought.
package A name or character vector giving the packages to look into for documentation. By default, all packages in the search path are used.
lib.loc A character vector of directory names of R libraries. Defaults to all libraries currently known.

Description

These functions provide online access to documentation. Documentation on an R entity function with name name can be printed on-screen with either help(name) or ?name. In the case of unary and binary operators and control-flow special forms, the name may need to be be quoted.

?data(name) provides information on the (first) data set named name. Additional arguments may be given to request specific information. E.g., ?data(name, package = PKG) only looks for documentation on data set name in the packages specified by PKG.

?package(name) displays information on package name, typically by listing the most important user-level R objects it contains. Equivalently, one could use library(help = name).

?library(lib.loc) informs about the libraries specified by lib.loc, usually giving their location and the list of packages available in them. Use library() to obtain a list of all available packages.

One can abbreviate the forms for obtaining information on data sets, packages and libraries, see the examples below.

See Also

help.start() which opens the HTML version of the R documentation; data, library, methods.

Examples

help(help) help() # the same help("for") # or ?"for" ?"+" ?data(index, package = base) # all data sets in base package ?data(women) # information about data set "women" ?d(women) # the same ?package(mva) # what is available in package "mva" library(help = mva) # the same ?library(getenv("RHOME")) # list packages in default library library() # list all available packages