example {base} | R Documentation |
Run all the R code from the EXAMPLES
part of R's online help
topic topic
.
example(topic, package = .packages(), lib, echo = TRUE, verbose = getOption("verbose"), prompt.echo = paste(abbreviate(topic, 6),"> ", sep=""))
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 sourcing. |
verbose |
logical; if TRUE , show even more when running
example code. |
prompt.echo |
character; gives the prompt to be used if
echo = TRUE . |
If lib.loc
is not specified, the packages are searched for
amongst those already loaded. If lib.loc
is specified,
they are searched for in the specified libraries, even if they are
already loaded from another library. An attempt is made to load the
package before running the examples, but this will not replace a
pacakge loaded from another location.
(the value of the last evaluated expression).
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'.
Martin Maechler and others
example("smooth", package="eda", lib.loc=.lib.loc) example(dbinom)