\Header{All}{Are All / Any Values True?}
\alias{any}{All}
\alias{all}{All}
\keyword{logic}{All}
\begin{Usage}
\begin{verbatim}
all(..., na.rm=FALSE)
any(..., na.rm=FALSE)
\end{verbatim}
\end{Usage}
\begin{Value}
Given a sequence of logical arguments, \texttt{all} returns a
logical value indicating whether or not all of the elements of
\texttt{x} are \texttt{TRUE}.
The value returned is \texttt{TRUE} if all the values in \texttt{x} are
\texttt{TRUE}, and \texttt{FALSE} if any the values in \texttt{x} are
\texttt{FALSE}.  If \texttt{x} consists of a mix of \texttt{TRUE} and
\texttt{NA} values, then \texttt{all} returns \texttt{NA}.

Given a sequence of logical arguments, \texttt{any} returns a
logical value indicating whether or not any of the elements of
\texttt{x} are \texttt{TRUE}.
The value returned is \texttt{TRUE} if any the values in \texttt{x} are
\texttt{TRUE}, and \texttt{FALSE} if all the values in \texttt{x} are
\texttt{FALSE}.  If \texttt{x} consists of a mix of \texttt{FALSE} and
\texttt{NA} values, then \texttt{any} returns \texttt{NA}.

For both functions the argument \texttt{na.rm} indicates whether
\texttt{NA} values should be removed before the result is computed.\end{Value}
\begin{Examples}
\begin{ExampleCode}
range(x <- sort(round(rnorm(10) - 1.2,1)))
if(any(x < 0)) cat("x contains negative values\n")
if(all(x < 0)) cat("all x values are negative\n")
\end{ExampleCode}
\end{Examples}

