example {base} | R Documentation |
Run an Examples section from the online help
Description
Run all the R code from the EXAMPLES
part of R's online help
topic topic
.
Usage
example(topic, package= .packages(), lib=.lib.loc,
echo=TRUE, verbose=.Options$verbose,
prompt.echo = paste(abbreviate(topic, 6),"> ", sep=""),
directory.sep= "/")
Arguments
topic |
name or character: The online |
package |
a character vector with package names. |
lib |
a character vector with path names of R package libraries. |
echo |
logical; if |
verbose |
logical; if |
prompt.echo |
character; gives the prompt to be used if
|
directory.sep |
character; the directory separating character (an idea to make this OS independent). |
Value
(the value of the last evaluated expression).
Note
The examples can be many small files. On some file systems 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’.
Author(s)
Martin Maechler
See Also
demo
Examples
example("smooth", package="eda")
example(dbinom)