\HeaderA{any}{Are Some Values True?}{any}
\keyword{logic}{any}
\begin{Description}\relax
Given a set of logical vectors, are any of the values true?
\end{Description}
\begin{Usage}
\begin{verbatim}
any(..., na.rm = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] one or more logical vectors.  Other objects are coerced in
a similar way as \code{as.logical.default}.
\item[\code{na.rm}] logical.  If true \code{NA} values are removed before
the result is computed.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This is a generic function: methods can be defined for it
directly or via the \code{\LinkA{Summary}{Summary}} group generic.
\end{Details}
\begin{Value}
Given a sequence of logical arguments, a logical value indicating
whether or not any of the elements of \code{x} are \code{TRUE}.

The value returned is \code{TRUE} if any the values in \code{x}
are \code{TRUE}, and \code{FALSE} if all the values in \code{x}
are \code{FALSE}.

If \code{na.rm = FALSE} and \code{x} consists of a mix of \code{FALSE}
and \code{NA} values, the value is \code{NA}.
\end{Value}
\begin{Note}\relax
Prior to \R{} 2.1.0, only \code{NULL} and logical, integer, numeric
and complex vectors were accepted.
\end{Note}
\begin{References}\relax
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
\emph{The New S Language}.
Wadsworth \& Brooks/Cole.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{all}{all}}, the \dQuote{complement} of \code{any}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
range(x <- sort(round(rnorm(10) - 1.2,1)))
if(any(x < 0)) cat("x contains negative values\n")
\end{ExampleCode}
\end{Examples}

