\Header{source}{Redirect Input}
\keyword{file}{source}
\keyword{programming}{source}
\begin{Usage}
\begin{verbatim}
source(file, local = FALSE, echo = verbose, print.eval = echo,
       verbose = .Options$verbose,  prompt.echo = .Options$prompt,
       max.deparse.length = 150)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{file}] character; the name of the file to read from (quoted).
\item[\texttt{local}] if \texttt{local} is \texttt{FALSE}, the statements scanned
are evaluated in the global environment, otherwise in the local
calling source.
\item[\texttt{echo}] logical; if \texttt{TRUE}, each expression is printed after
parsing, before evaluation.
\item[\texttt{print.eval}] logical; if \texttt{TRUE}, the result of
\texttt{eval(i)} is printed for each expression \texttt{i}; defaults to
\texttt{echo}.
\item[\texttt{verbose}] if \texttt{TRUE}, more diagnostics (than just \texttt{echo = TRUE})
are printed during parsing and evaluation of input, including
extra info for \bold{each} expression.
\item[\texttt{prompt.echo}] character; gives the prompt to be used if
\texttt{echo = TRUE}.
\item[\texttt{max.deparse.length}] integer; is used only if \texttt{echo} is
\texttt{TRUE} and gives the maximal length of the ``echo'' of a single
expression.
\end{ldescription}
\end{Arguments}
\begin{Description}
\texttt{source} causes \R\ to accept its input from the named file (the
name must be quoted).
Input is read from that file until the end of the file is reached.
\texttt{\Link{parse}} is used to scan the expressions in, they are then
evaluated sequentially in the chosen environment.\end{Description}
\begin{SeeAlso}
\texttt{\Link{demo}} which uses \texttt{source};
\texttt{\Link{eval}}, \texttt{\Link{parse}} and \texttt{\Link{scan}}.\end{SeeAlso}

