boxplot.stats {base} | R Documentation |
Box Plot Statistics
Description
This function is typically is called by boxplot
to
gather the statistics necessary for producing box plots,
but may be invoked separately.
Usage
boxplot.stats(x, coef = 1.5, do.conf=TRUE, do.out=TRUE)
Arguments
x |
a numeric vector for which the boxplot will
be constructed ( |
coef |
this determines how far the plot “whiskers” extend out
from the box. If |
do.conf , do.out |
logicals; if |
Value
List with named components as follows:
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. |
n |
the number of of non- |
conf |
the lower and upper extremes of the “notch”. |
out |
the values of any data points which lie beyond the extremes of the whiskers. |
Note that $stats
and $conf
are sorted in increasing
order, unlike S, and that $n
and $out
include any
+- Inf
values.
See Also
fivenum
, boxplot
, bxp
.
Examples
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)))