help
Online Documentation

Description

Generates object to show online documentation.

Usage

help(topic, package = NULL, lib.loc = NULL, verbose = getOption("verbose"), 
    try.all.packages = getOption("help.try.all.packages"), help_type = getOption("help_type")) 

Arguments

topic a name or character string specifying a particular function, operator, or other object. If topic is not a valid syntactic name, or if it is a reserved word such as if, for, or break, it must be enclosed in quotes. The default value displays the help documentation for the help function, if both package and lib.loc are NULL.
package a name or character string specifying the package where topic is searched. If NULL, all loaded packages in search list will be used for topic searching.
lib.loc a character vector containing the names of library directories. If NULL, the .libPaths() is used.
verbose logical value. If it is TRUE, displays warnings message when package is found more than once in library directories. The default is the value of system option "verbose".
try.all.packages logical value. Controls if other available packages should be searched while: both package and lib.loc are missing, and topic are not found in search list(in loaded packages). The default is the value of system option "help.try.all.packages".
help_type character string specifying the help type(case insensitive). Currently, the supported help type are: "text", "html", "postscript", "ps" and "pdf". The default is the value of system option "help_type". If default value is missing in option, then "text" is used as help type.

Details

The help documentation is stored inside of each package. Normally, a set of help files are located in the help directory under each package directory.
help will search for file aliases.rds or AnIndex (if the former doesn't exist) in help directory under specified or all package directories, to find the index matching to specified topic. More than one topic may be found in different packages. If more than one topic is found and the verbose argument is TRUE, a warning will be issued.
If topic is missing, and package is specified, library() is called to return package information. If both topic and package are missing, and lib.loc is specified, library() is called to return library information. If all of topic, package and lib.loc are missing, the help documentation for the help function are returned(this document).
The returned object could be inherited from class "help_files_with_topic", "packageInfo" or "libraryIQR". The S3 methods of generic function print() for these classes are implemented. They are used to show the online help information about a specified topic, package, or library location.
Value
Normally returns an object of class "help_files_with_topic" containing the full paths of the found topic. Normally, the path has the format: "<lib.loc>/<package>/help/<index>". Some attributes are also attached to returned object:
"call" call of this function in which all of the arguments are specified by name.
"topic" character string of topic.
"tried_all_packages" logical value. TRUE indicates that all packages has been tried in this function. Note that this may not be identical to argument try.all.packages.
"type" the help type that is specified.
There are also two special cases:
  1. topic is missing and package is specified. Returns an object of class "packageInfo". See library.
  2. Both topic and package are missing, and lib.loc is specified. Returns an object of class "libraryIQR". See library.
Note
The online help documentation won't be showed up unless print() is called explicitly or implicitly.
See Also
args, library, .libPaths, .packages, readRDS
Examples
## Not run: 
# Display this help file.
help() 
# Documentation for the function aperm().
ret <- help(aperm)
print(ret)
# Addition operator and other arithmetic functions. 
help("+")
# Help file for some reserved words.
help("if")
# Help for a package
help(package = arbor)
# Help for a library
help(lib.loc = .libPaths())
# other usage.
help(galaxy, try.all.packages = TRUE)  # "galaxy" is a dataset in "Sdatasets" package.
help(galaxy, package = Sdatasets)

# help documentation is showed in browser. help(aperm, help_type = "html") ## End(Not run)

Package utils version 6.1.1-7
Package Index