

   example {base}                               R Documentation

   RRuunn aann EExxaammpplleess SSeeccttiioonn ffrroomm tthhee OOnnlliinnee HHeellpp

   DDeessccrriippttiioonn::

        Run all the R code from the `EXAMPLES' part of R's
        online help topic `topic'.

   UUssaaggee::

        example(topic, package= .packages(), lib=.lib.loc,
                echo=TRUE, verbose=.Options$verbose,
                prompt.echo = paste(abbreviate(topic, 6),"> ", sep=""),
                directory.sep= "/")

   AArrgguummeennttss::

      topic: name or character:  The online `help' topic the
             examples of which should be run.

    package: a character vector with package names.

        lib: a character vector with path names of R package
             libraries.

       echo: logical;  if `TRUE', show the R input when sourc-
             ing.

    verbose: logical;  if `TRUE', show even more when running
             example code.

   prompt.echo: character; gives the prompt to be used if `echo
             = TRUE'.

   directory.sep: character; the directory separating character
             (an idea to make this OS independent).

   VVaalluuee::

        (the value of the last evaluated expression).

   NNoottee::

        The examples can be many small files. On some file sys-
        tems it is desirable to save space, and the files in
        the `R-ex' directory of an installed package can be
        zipped up as a zip archive `Rex.zip'.

   AAuutthhoorr((ss))::

        Martin Maechler

   SSeeee AAllssoo::

        `demo'

   EExxaammpplleess::

        example("smooth", package="eda")
        example(dbinom)

