\Header{example}{Run an Examples section from the online help}
\keyword{documentation}{example}
\keyword{utilities}{example}
\begin{Usage}
\begin{verbatim}
example(topic, package= .packages(), lib=.lib.loc,
        echo=TRUE, verbose=.Options$verbose,
        prompt.echo = paste(abbreviate(topic, 6),"> ", sep=""),
        directory.sep= "/")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{topic}] name or character:  The online \texttt{\Link{help}} topic
the examples of which should be run.
\item[\texttt{package}] a character vector with package names.
\item[\texttt{lib}] a character vector with path names of \R\ package libraries.
\item[\texttt{echo}] logical;  if \texttt{TRUE}, show the \R\ input when sourcing.
\item[\texttt{verbose}] logical;  if \texttt{TRUE}, show even more when running
example code.
\item[\texttt{prompt.echo}] character; gives the prompt to be used if
\texttt{echo = TRUE}.
\item[\texttt{directory.sep}] character; the directory separating character (an
idea to make this OS independent).
\end{ldescription}
\end{Arguments}
\begin{Description}
Run all the \R\ code from the \texttt{EXAMPLES} part of \R's online help
topic \texttt{topic}.\end{Description}
\begin{Value}
(the value of the last evaluated expression).\end{Value}
\begin{Note}
The examples can be many small files. On some file systems it is
desirable to save space, and the files in the \file{R-ex} directory
of an installed package can be zipped up as a zip archive \file{Rex.zip}.\end{Note}
\begin{Author}
Martin Maechler\end{Author}
\begin{SeeAlso}
\texttt{\Link{demo}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
example("smooth", package="eda")
example(dbinom)
\end{ExampleCode}
\end{Examples}

