\Header{IQR}{The Interquartile Range}
\keyword{univar}{IQR}
\keyword{robust}{IQR}
\keyword{distribution}{IQR}
\begin{Usage}
\begin{verbatim}
IQR(x, na.rm = FALSE)
\end{verbatim}
\end{Usage}
\begin{Description}
computes interquartile range of the \texttt{x} values.\end{Description}
\begin{Details}
Note that this function computes the quartiles using the
\texttt{\Link{quantile}} function rather than following Tukey's recommendations,
i.e., \texttt{IQR(x) = quantile(x,3/4) - quantile(x,1/4)}.

For normally \eqn{N(m,1)}{} distributed \eqn{X}{}, the expected value of
\texttt{IQR(X)} is \texttt{2*qnorm(3/4) = 1.3490}, i.e., for a normal-consistent
estimate of the standard deviation, use \texttt{IQR(x) / 1.349}.\end{Details}
\begin{References}
Tukey, J. W. (1977).
\emph{Exploratory Data Analysis}.
Reading: Addison-Wesley.\end{References}
\begin{SeeAlso}
\texttt{\Link{fivenum}}, \texttt{\Link{mad}} which is more robust,
\texttt{\Link{range}}, \texttt{\Link{quantile}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(rivers)
IQR(rivers)
\end{ExampleCode}
\end{Examples}

