help                  package:base                  R Documentation

_D_o_c_u_m_e_n_t_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     These functions provide access to documentation. Documentation on
     a topic with name `name' (typically, an R object or a data set)
     can be printed with either `help(name)' or `?name'.

_U_s_a_g_e:

     help(topic, offline = FALSE, package = .packages()
          lib.loc = .lib.loc, verbose = getOption("verbose"),
          try.all.packages = getOption("help.try.all.packages"),
          htmlhelp = getOption("htmlhelp"))
     ?topic

_A_r_g_u_m_e_n_t_s:

   topic: a name or character string on which documentation is sought
          (but not a variable containing a character string!).

 offline: a logical indicating whether documentation should be
          displayed on-line to the screen (the default) or hardcopy of
          it should be produced.

 package: a name or character vector giving the packages to look into
          for documentation.  By default, all packages in the search
          path are used.

 lib.loc: a character vector of directory names of R libraries.
          Defaults to all libraries currently known. If the default is
          used, the loaded packages are searched before the libraries.

 verbose: logical; if `TRUE', the file name is reported.

try.all.packages: logical; see `Notes'.

htmlhelp: logical (or `NULL').  If `TRUE' (which is the default after
          `help.start' has been called), the HTML version of the help
          will be shown in a browser.

_D_e_t_a_i_l_s:

     In the case of unary and binary operators and control-flow special
     forms, the name may need to be quoted.

     If `offline' is `TRUE', hardcopy of the documentation is produced
     by running the LaTeX version of the help page through `latex'
     (note that LaTeX 2e is needed) and `dvips'. Depending on your
     `dvips' configuration, hardcopy will be sent to the printer or
     saved in a file.  If the programs are in non-standard locations
     and hence were not found at compile time, you can either set the
     options `latexcmd' and `dvipscmd', or the environment variables
     `R_LATEXCMD' and `R_DVIPSCMD' appropriately. The appearance of the
     output can be customized through a file `Rhelp.cfg' somewhere in
     your LaTeX search path.

_N_o_t_e:

     Unless `lib.loc' is specified explicitly, the loaded packages are
     searched before those in the specified libraries.  This ensures
     that if a library is loaded from a library not in `.lib.loc' then
     the help from the loaded library is used.  If `lib.loc' is
     specified explicitly, the loaded packages are not searched.

     If this search fails and argument `try.all.packages' is `TRUE' and
     neither `packages' nor `lib.loc' is specified, then all the
     packages in `lib.loc' are searched for help on `topic' and a list
     of (any) packages where help may be found is printed (but no help
     is shown). N.B. searching all packages can be slow.

     The help files can be many small files.  On some file systems it
     is desirable to save space, and the text files in the `help'
     directory of an installed package can be zipped up as a zip
     archive `Rhelp.zip'. Ensure the files `AnIndex' and `00Titles'
     remain un-zipped.  Similarly, all the files in the `latex'
     directory can be zipped to `Rhelp.zip'.

_S_e_e _A_l_s_o:

     `help.search()' for finding help pages on a ``vague'' topic.
     `help.start()' which opens the HTML version of the R help pages;
     `library()' for listing available packages and the user-level
     objects they contain; `data()' for listing available data sets;
     `methods()'.

     See `prompt()' to get a prototype for writing `help' pages of
     private packages.

_E_x_a_m_p_l_e_s:

     help()
     help(help)              # the same

     help(lapply)
     ?lapply                 # the same

     help("for")             # or ?"for", but the quotes are needed
     ?"+"

     help(package = stepfun) # get help even when package is not loaded

     data()                  # list all available data sets
     ?women                  # information about data set "women"

     topi <- "women"
     help(topi) ##--> Error: No documentation for `topi'

     try(help("bs", try.all.packages=FALSE)) # reports not found (an error)
     help("bs", try.all.packages=TRUE) # reports can be found in package `splines'

