\Header{warning}{Warning Messages}
\keyword{programming}{warning}
\keyword{error}{warning}
\begin{Description}\relax
Generates a warning message that corresponds to its argument and the
expression or function from which it was called.\end{Description}
\begin{Usage}
\begin{verbatim}
warning(message)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{message}] character string (of length 1) or \code{NULL}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The result \emph{depends} on the value of
\code{\Link{options}("warn")}.

If \code{warn} is negative warnings are ignored; if it is zero they
are stored and printed after the top--level function has completed; if
it is one they are printed as they occur and if it is 2 (or larger)
warnings are turned into errors.

If \code{warn} is zero (the default), a top-level variable
\code{last.warning} is created.  It contains the warnings which can be
printed via a call to \code{\Link{warnings}}.\end{Details}
\begin{SeeAlso}\relax
\code{\Link{stop}} for fatal errors,
\code{\Link{warnings}},
and \code{\Link{options}(warn=..)}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

\end{ExampleCode}
\end{Examples}

