[R] Impaired boxplot functionality - mean instead of median

P Ehlers ehlers at math.ucalgary.ca
Fri Dec 2 01:08:08 CET 2005

Kjetil Brinchmann Halvorsen wrote:
> P Ehlers wrote:
>> I'd like to add two comments to Martin's sensible response.
>> 1. I've seen several intro-stats textbooks that define a
>> boxplot to have whiskers to the extreme data values
>> and then define Tukey's boxplot as a "modified" boxplot.
>> I wish authors wouldn't do that.
>> 2. I've also seen boxplots used for sample sizes as small
>> as -- are you ready for it? -- n = 2!! (Admittedly, only in
>> plots comparing several groups.) The help page for
>> stripchart() points out that stripcharts "are a good
>> alternative to boxplots when sample sizes are small".
>> My own rule-of-thumb: n > 20 for single boxplots, n > 12
>> for multiple boxplots.
> Woul've it make sense to have an option to replace boxes with dotplots
> for only those groups with number of observations lesser tahn nmin=20 (say)
> Kjetil

Probably best just to leave it up to the user.

Peter Ehlers

More information about the R-help mailing list