Learn R Programming

ggthemes (version 2.1.0)

stat_fivenumber: Calculate components of a five-number summary

Description

The five number summary of a sample is the minimum, first quartile, median, third quartile, and maximum.

Usage

stat_fivenumber(mapping = NULL, data = NULL, geom = "boxplot",
  position = "dodge", na.rm = FALSE, ...)

Arguments

mapping
The aesthetic mapping, usually constructed with aes or aes_string. Only needs to be set at the layer level if you are overriding the plot defaults.
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
na.rm
If FALSE (the default), removes missing values with a warning. If TRUE silently removes missing values.
...
other arguments passed on to layer. This can include aesthetics whose values you want to set, not map. See layer for more details.

Value

  • A data frame with additional columns:
  • widthwidth of boxplot
  • yminminimum
  • lowerlower hinge, 25% quantile
  • notchlowerlower edge of notch = median - 1.58 * IQR / sqrt(n)
  • middlemedian, 50% quantile
  • notchupperupper edge of notch = median + 1.58 * IQR / sqrt(n)
  • upperupper hinge, 75% quantile
  • ymaxmaximum

Aesthetics

[results=rd,stage=build]{ggthemes:::rd_aesthetics("stat_fivenumber", ggthemes:::StatFivenumber)} stat_boxplot