help.search
Search the Help System

### Description

Search the help system by using approximate or regular expression matching against aliases, concepts, keywords, names and/or titles.

### Usage

    help.search(pattern, fields = c("alias", "concept", "title"), apropos,
        keyword, whatis, ignore.case = TRUE, package = NULL,
        lib.loc = NULL, help.db = getOption("help.db"),
        verbose = getOption("verbose"), rebuild = FALSE, agrep = NULL,
        use_UTF8 = FALSE, types = getOption("help.search.types"))
    ??pattern
    field??pattern

### Arguments

pattern | a character string specifying the topic or a regular expression to search for fields in the help system. If pattern is supplied, the apropos, keyword, and whatis arguments are ignored.
fields, field | a character string or vector specify the fields of help system in which to search. Can be one or more abbreviations of alias, concept, keyword, name, and title. For field (used by ??), it must be single character string.
apropos | a character string specifying the topic to search in the fields alias and title. If it is supplied, the keyword and whatis arguments will be ignored.
keyword | a character string specifying the keyword to search in the field keyword. If supplied, the whatis argument is ignored and the agrep argument is set to FALSE.
whatis | a character string specifying the topic to search in the field alias.
ignore.case | a logical value. If TRUE (the default), uppercase and lowercase characters are considered equivalent when matching.
package | a character vector specifying the names of packages in which to search. If NULL, all available packages located in lib.loc are searched.
lib.loc | a character vector containing the names of library directories. If NULL, the value of .libPaths() is used.
help.db | This argument is deprecated and kept for compatibility.
verbose | a logical value. If TRUE, displays trace information during the search progress. The default is the value of system option "verbose".
rebuild | a logical value. If TRUE, the help system database is rebuilt before searching. If FALSE (the default), the help system database is not rebuilt unless one of the following conditions is true: The database has not yet been built during this session. The specified lib.loc argument is different from the one that is used to generate the database. The creation time of the database is older than the creation time of files under the lib.loc. The packages specified by the package argument are not in the database.
agrep | This argument is not yet implemented. This argument can be NULL, logical, a numeric, or a list. If agrep is NULL (the default), approximate matching (as implemented by the agrep function) is used if the pattern contains only alphanumeric, space and dash characters, and it has more than four characters. Otherwise regular expression matching (as implemented by the grep function) is used. If agrep is TRUE, a numeric vector or a list, fuzzy matching is used. The value of the agrep argument specifies the maximum distance that should be used during the search. A TRUE value enables fuzzy matching with agrep's default maximum distance of 0.1. If agrep is FALSE, regular expression matching is used.
use_UTF8 | a logical value. If TRUE, UTF-8 encoding is used for some character strings. The default is FALSE.
types | character vector gives the types of documentation and the order of their display. The supported types are one or more of "help", "vignette" and/or "demo". The default is the value of system option "help.search.types" and vignettes and demos as well as help pages will be displayed.

### Details

?? is a convenient way to use help.search with a single argument or with another single field to search for.
Value
help.search and ?? return a list of objects inherited from class hsearch with following components:

pattern | the actual topic string used for searching. It is one of the pattern, apropos, keyword or whatis arguments.
fields | the actual fields that are used for searching. It can be different from the argument fields.
type | the type of matching that is used: fuzzy or regexp.
agrep | the input of argument agrep.
ignore.case | the input of argument ignore.case.
types | the types of documentation and the order of their display.
package | the names of packages in which to search.
lib.loc | the names of library directories.
matches | the matched results, in a 6-column character matrix. The column names are topic, title, Package, LibPath, name, and Type, which correspond to the topic names, titles, package names, full path to the package of the matched topics in the help system, original documentation file, and the type of documentation. The matrix contains one row for every matched topic.

See Also
help, help.start, ?, agrep, grep, .libPaths
Examples

    ## Not run:
    help.search("nls")
    help.search("nonlinear regression")
    ret <- help.search(keyword = "nonlinear")
    ret
    help.search("barley", package = "Sdatasets", verbose = TRUE, rebuild = TRUE)
    # Force to rebuild database for the following examples
    help.search("", rebuild = TRUE)
    ??factor
    title??factor

    ## End(Not run)

Package utils version 6.1.5-18
Package Index