\Header{range}{Range of Values}
\methalias{range.default}{range}
\keyword{univar}{range}
\keyword{arith}{range}
\begin{Description}\relax
\code{range} returns a vector containing the minimum and maximum of
all the given arguments.
\end{Description}
\begin{Usage}
\begin{verbatim}
range(..., na.rm = FALSE)

## Default S3 method:
range(..., na.rm = FALSE, finite = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] any \code{\Link{numeric}} objects.
\item[\code{na.rm}] logical, indicating if \code{\Link{NA}}'s should be
omitted.
\item[\code{finite}] logical, indicating if all non-finite elements should
be omitted.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{range} is a generic function: methods can be defined for it
directly or via the \code{\Link{Summary}} group generic.

If \code{na.rm} is \code{FALSE}, \code{NA}
and \code{NaN} values in any of the arguments will cause \code{NA} values
to be returned, otherwise \code{NA} values are ignored.

If \code{finite} is \code{TRUE}, the minimum
and maximum of all finite values is computed, i.e.,
\code{finite=TRUE} \emph{includes} \code{na.rm=TRUE}.

A special situation occurs when there is no (after omission
of \code{NA}s) nonempty argument left, see \code{\Link{min}}.
\end{Details}
\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{\Link{min}},
\code{\Link{max}},
\code{\Link{Methods}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
(r.x <- range(rnorm(100)))
diff(r.x) # the SAMPLE range

x <- c(NA, 1:3, -1:1/0); x
range(x)
range(x, na.rm = TRUE)
range(x, finite = TRUE)
\end{ExampleCode}
\end{Examples}

