\Header{range}{Range of Values}
\keyword{univar}{range}
\keyword{arith}{range}
\begin{Usage}
\begin{verbatim}
range(..., na.rm = FALSE, finite = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{...}] any \texttt{\Link{numeric}} objects.
\item[\texttt{na.rm}] logical, indicating if \texttt{\Link{NA}}'s should be omitted.
\item[\texttt{finite}] logical, indicating if all non-finite elements should be
omitted.
\end{ldescription}
\end{Arguments}
\begin{Description}
\texttt{range} returns a vector containing the minimum and maximum of
all the values present in its first arguments, unless \texttt{na.rm} or
\texttt{finite} is \texttt{TRUE}.
If \texttt{na.rm} is \texttt{FALSE}, \texttt{NA} and \texttt{NaN} values in any of the
arguments will cause NA values to be returned, otherwise
\texttt{NA} values are ignored.
If \texttt{finite} is \texttt{TRUE}, the minimum and maximum of all finite
values is computed, i.e., \texttt{finite=TRUE} \emph{includes}
\texttt{na.rm=TRUE}.\end{Description}
\begin{SeeAlso}
\texttt{\Link{min}}, \texttt{\Link{max}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
print(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}

