stat_boxplot {ggplot2} | R Documentation |
Calculate components of box and whisker plot.
stat_boxplot(mapping = NULL, data = NULL, geom = "boxplot", position = "dodge", na.rm = FALSE, coef = 1.5, ...)
coef |
length of the whiskers as multiple of IQR. Defaults to 1.5 |
na.rm |
If |
mapping |
The aesthetic mapping, usually constructed
with |
data |
A layer specific dataset - only needed if you want to override the plot defaults. |
geom |
The geometric object to use display the data |
position |
The position adjustment to use for overlappling points on this layer |
... |
other arguments passed on to
|
A data frame with additional columns:
width |
width of boxplot |
ymin |
lower whisker = smallest observation greater than or equal to lower hinge - 1.5 * IQR |
lower |
lower hinge, 25% quantile |
notchlower |
lower edge of notch = median - 1.58 * IQR / sqrt(n) |
middle |
median, 50% quantile |
notchupper |
upper edge of notch = median + 1.58 * IQR / sqrt(n) |
upper |
upper hinge, 75% quantile |
ymax |
upper whisker = largest observation less than or equal to upper hinge + 1.5 * IQR |
stat_boxplot
understands the following aesthetics (required aesthetics are in bold):
x
y
See geom_boxplot
for examples.
# See geom_boxplot for examples