[R] Boxplot: what is shown by default?

Peter Ehlers ehlers at ucalgary.ca
Fri Jun 4 10:44:59 CEST 2010


On 2010-06-04 0:14, Thomas von Känel wrote:
> hi,
> i'm using /"boxplot()"/ to show some data:
>
> x<- c(0.99, 0.97, 0.91, 0.72, 1.00, 0.99, 1.02, 0.90, 0.91, 0.90, 1.02,
> 0.90, 1.35, 1.01, 0.92)
> boxplot(x)
>
> is it correct when i say: /"Boxes represent interquartile ranges (IQRs);
> bold horizontal lines, medians; whiskers, lowest and highest values
> still within 1.5 x IQR; open circles, outliers."?
>

That's essentially correct, except that quartiles can be
defined in more than one way; see ?quantile and the
discussion leading to comments in
https://stat.ethz.ch/pipermail/r-help/2010-May/239074.html.

Note that the box limits are the 'hinges' given by
fivenum(x) and their difference need not equal IQR(x) which
uses quantile(..., type=7). [For your data above, they do
happen to coincide.]

  -Peter Ehlers

> /thanks in advance for any help!
> cheers, tom
> human genetics, bern/
> /
>



More information about the R-help mailing list