RDocumentation (version 0.5)

help: Documentation on RDocumentation or via the normal help system if offline

Description

help contacts RDocumentation for help given aliases and packages

These functions provide access to RDocumentation. Documentation on a topic with name name (typically, an R object or a data set) can be displayed by either help("name") or ?name.

Usage

help(...)
"?"(...)

Arguments

package
a name or character vector giving the packages to look into for documentation, or NULL. By default, all packages whose namespaces are loaded are used. To avoid a name being deparsed use e.g. (pkg_ref) (see the examples).
lib.loc
a character vector of directory names of R libraries, or NULL. The default value of NULL corresponds to all libraries currently known. If the default is used, the loaded packages are searched before the libraries. This is not used for HTML help (see ‘Details’ from help). When no local matches are found, RDocumentation will ignore local libraries and search in the online database.
verbose
logical; if TRUE, the file name is reported.
try.all.packages
logical; see Note on help.
help_type
only works if the user is offline, otherwise documentation is viewed on RDocumentation.org in the help-panel character string: the type of help required. Possible values are code"text", "html" and code"pdf". Case is ignored, and partial matching is allowed.
topic
Usually, a name or character string specifying the topic for which help is sought. Alternatively, a function call to ask for documentation on a corresponding S4 method: see the section on S4 method documentation in ?. The calls pkg::topic and pkg:::topic are treated specially, and look for help on topic in package pkg.
type
the special type of documentation to use for this topic; for example, if the type is class, documentation is provided for the class with name topic. See the Section ‘S4 Method Documentation in ?’ for the uses of type to get help on formal methods, including methods?function and method?call.

This is a shortcut to help and uses its default type of help. Some topics need to be quoted (by backticks) or given as a character string. There include those which cannot syntactically appear on their own such as unary and binary operators, function and control-flow reserved words (including if, else for, in, repeat, while, break and next. The other reserved words can be used as if they were names, for example TRUE, NA and Inf.

Details

for slow internet connections, a timeout can be set for getting the page of Rdocumentation via options("Rdocumentation.timeOut" = nb_of_seconds) the default timeout is 3 seconds

See Also

http://www.RDocumentation.org for the online version of the documentation, help.search for finding help on vague topics or help for documentation of the offline help.

Examples

Run this code
help(package=Rdocumentation)
help(strsplit,base)

?"for"                  # but quotes/backticks are needed
?`+`

?women                  # information about data set "women"

## Not run: 
# require(methods)
# ## define a S4 generic function and some methods
# combo <- function(x, y) c(x, y)
# setGeneric("combo")
# setMethod("combo", c("numeric", "numeric"), function(x, y) x+y)
# 
# ## assume we have written some documentation
# ## for combo, and its methods ....
# 
# ?combo  # produces the function documentation
# 
# methods?combo  # looks for the overall methods documentation
# 
# method?combo("numeric", "numeric")  # documentation for the method above
# 
# ?combo(1:10, rnorm(10))  # ... the same method, selected according to
#                          # the arguments (one integer, the other numeric)
# 
# ?combo(1:10, letters)    # documentation for the default method
# ## End(Not run)

Run the code above in your browser using DataLab