help.search               package:base               R Documentation

_S_e_a_r_c_h _t_h_e _H_e_l_p _S_y_s_t_e_m

_D_e_s_c_r_i_p_t_i_o_n:

     Allows for searching the help system for documentation matching a
     given regular expression in its name, alias, title, or keyword
     entries (or any combination thereof).  Names and titles of the
     matched help entries are nicely displayed; currently, nothing is
     returned.

_U_s_a_g_e:

     help.search(topic, fields = c("name", "title"),
                 apropos, keyword, whatis, ignore.case = TRUE,
                 packages = NULL, lib.loc = .lib.loc,
                 help.db = getOption("help.db"),
                 verbose = getOption("verbose"),
                 rebuild = FALSE)

_A_r_g_u_m_e_n_t_s:

    what: a character string containing a regular expression 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 data
          bases to be searched.  The entries must be abbreviations of
          `"name"', `"alias"', `"title"', and `"keyword"',
          corresponding to the help page's (file) name, the objects it
          provides documentation for, its title, and the keywords it
          can be classified to.

 apropos: a character string containing a regular expression to be
          matched in the help page names and titles.

 keyword: a character string containing a regular expression to be
          matched in the help page keywords.

  whatis: a character string containing a regular expression to be
          matched in the help page names.

ignore.case: a logical.  If `TRUE', case is ignored during matching; if
          `FALSE', pattern matching is case sensitive.

packages: a character vector with the names of packages to search
          through, or `NULL' in which case all available packages in
          the specified library trees `lib.loc' are searched.

 lib.loc: a character vector describing the location of R library trees
          to search through.

 help.db: a character string giving the file path to a previously built
          and saved help data base, or `NULL'.

 verbose: logical; if `TRUE', the search process is traced.

 rebuild: a logical indicating whether the help data base should be
          rebuilt.

_D_e_t_a_i_l_s:

     Upon installation of a package, the Perl script `Rd2contents'
     creates a `CONTENTS' data base which contains the information on
     name, aliases, title and keywords (as well as the URL of the HTML
     version of the help file) in Debian Control Format.  This is the
     data base searched by `help.search()'.

     The arguments `apropos' and `whatis' play a role similar to the
     Unix commands with the same names.

     If possible, the help data base is saved to the file `help.db' in
     the `.R' subdirectory of the user's home directory or the current
     working directory.

     Note that currently, the aliases in the matching help files are
     not displayed.

_S_e_e _A_l_s_o:

     `help'; `help.start' for starting the hypertext (currently HTML)
     version of R's online documentation, which offers a similar search
     mechanism.

     `apropos' uses regexps and has nice examples.

_E_x_a_m_p_l_e_s:

     help.search("linear models")    # In case you forgot how to fit linear
                                     # models

     help.search("print")            # All help pages with name or title
                                     # matching `print'
     help.search(apropos = "print")  # The same
     help.search(keyword = "hplot")  # All help pages documenting high-level
                                     # plots.

