Arguments
pattern
a character string to be matched in the specified fields. If this is given, the arguments apropos
, keyword
, and whatis
are ignored.
fields
a character vector specifying the fields of the help database to be searched. The entries must be abbreviations of "name"
, "title"
, "alias"
, "concept"
, and "keyword"
,
corresponding to the help page's (file) name, its title, the topics and concepts it provides documentation for, and the keywords it can be classified to.
See below for details and how vignettes and demos are searched.
apropos
a character string to be matched in the help page topics and title.
keyword
a character string to be matched in the help page ‘keywords’. ‘Keywords’ are really categories: the standard categories are listed in file ‘R.home("doc")/KEYWORDS’
(see also the example) and some package writers have defined their own. If keyword
is specified, agrep
defaults to FALSE
.
whatis
a character string to be matched in the help page topics.
ignore.case
a logical. If TRUE
, case is ignored during matching; if FALSE
, pattern matching is case sensitive. If no local matches are found, the online search is used, which is always non case-sensitive.
package
a character vector with the names of packages to search through, or NULL
in which case all available packages in the library trees specified by lib.loc
are searched.
if no matches are found, the RDocumentation.org database is searched.
lib.loc
a character vector describing the location of R library trees to search through, or NULL
. The default value of NULL
corresponds to all libraries currently known. If no matches are found in the given library,
the online search of RDocumentation is used.
help.db
a character string giving the file path to a previously built and saved help database, or NULL
.
verbose
logical; if TRUE
, the search process is traced. Integer values are also accepted, with TRUE
being equivalent to 2
,
' and 1
being less verbose. On Windows a progress bar is shown during rebuilding, and on Unix a heartbeat is shown for verbose = 1
and a package-by-package list for verbose >= 2
.
rebuild
a logical indicating whether the help database should be rebuilt. This will be done automatically if lib.loc
or the search path is changed,
or if package
is used and a value is not found.
agrep
if NULL
(the default unless keyword
is used) and the character string to be matched consists of alphanumeric characters,
whitespace or a dash only, approximate (fuzzy) matching via agrep
is used unless the string has fewer than 5 characters;
otherwise, it is taken to contain a regular expression (regex
) to be matched via grep
. If FALSE
,
approximate matching is not used. Otherwise, one can give a numeric or a list specifying the maximal distance for the approximate match, see argument max.distance
in the documentation for agrep. use_UTF8
logical: should results be given in UTF-8 encoding? Also changes the meaning of regexps in agrep
to be Perl regexps. This does not have effect when the online database is used.
types
a character vector listing the types of documentation to search. The entries must be abbreviations of "vignette"
, "help"
or "demo"
. Results will be presented in the order specified.