\Header{boxplot.stats}{Box Plot Statistics}
\keyword{dplot}{boxplot.stats}
\begin{Usage}
\begin{verbatim}
boxplot.stats(x, coef = 1.5, do.conf=TRUE, do.out=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{x}] a numeric vector for which the boxplot will
be constructed (\texttt{\Link{NA}}s and \texttt{\Link{NaN}}s are allowed
and omitted).
\item[\texttt{coef}] this determines how far the plot ``whiskers'' extend out
from the box.  If \texttt{coef} is positive, the whiskers extend to the
most extreme data point which is no more than \texttt{coef} times the
interquartile coef from the box.  A value of zero causes the whiskers
to extend to the data extremes.
\item[\texttt{do.conf,do.out}] logicals; if \texttt{FALSE}, the \texttt{conf} or
\texttt{out} component respectively will be empty in the result.
\end{ldescription}
\end{Arguments}
\begin{Description}
This function is typically is called by \texttt{\Link{boxplot}} to
gather the statistics necessary for producing box plots,
but may be invoked separately.\end{Description}
\begin{Value}
List with named components as follows:
\begin{ldescription}
\item[\texttt{stats}] a vector of length 5, containing the extreme of the
lower whisker, the lower ``hinge'', the median, the upper ``hinge''
and the extreme of the upper whisker.
\item[\texttt{n}] the number of of non-\texttt{NA} observations in the sample.
\item[\texttt{conf}] the lower and upper extremes of the ``notch''.
\item[\texttt{out}] the values of any data points which lie beyond the
extremes of the whiskers.
\end{ldescription}


Note that \texttt{\$stats} and \texttt{\$conf} are sorted \emph{in}creasingly,
contrary to S, and that \texttt{\$n} and \texttt{\$out} include any
\texttt{+- Inf} values.\end{Value}
\begin{SeeAlso}
\texttt{\Link{fivenum}}, \texttt{\Link{boxplot}}, \texttt{\Link{bxp}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- c(1:100, 1000)
str(boxplot.stats(x))
str(boxplot.stats(x, do.conf=FALSE,do.out=FALSE))
str(boxplot.stats(x, coef = 3, do.conf=FALSE))
str(boxplot.stats(x, coef = 0))

str(boxplot.stats(c(x,NA)))
str(boxplot.stats(c(x,-1:1/0)))
\end{ExampleCode}
\end{Examples}

