Re: [R] Impaired boxplot functionality - mean instead of median

From: Marc Schwartz (via MN) <>
Date: Fri 02 Dec 2005 - 06:59:03 EST

> Marc Schwartz (via MN) пишет:
> > On Thu, 2005-12-01 at 19:40 +0300, Evgeniy Kachalin wrote:
> >
> >>Martin Maechler пишет:
> >>So I analize genetics data. I have some factor (gene variant, c(1,2,3))
> >>and the quantitative variable corresponding to that factor. How do I
> >>visualize this situation? Compare mean of samples corresponding to
> >>factor values?
> >>
> >>Should boxplot support 'mean-in-the-middle', it would fit my needs
> >>ideally. How do I plot mean +/- SD plot?
> >>
> >>Also there is a way to rewrite boxplot.stats and replace "fivenum" there
> >>for self-made function. Then I would need to write self-made
> >>boxplot.formula (or boxplot.default?) function. And all this stuff would
> >>not be configurable. I'm still novice in R, so I need simple way to
> >>pre-visualize my data and estimate approximate result.
> >
> >
> > If you want means and SDs, you might want to look at:
> >
> > 1. plotCI() and plotmeans() in the gplots package
> So plotmeans is incapable of: boxplot(numerical~fact1+fact2). Is there
> any way further?

I think that somehow we are talking past each other here.

plotmeans() does what it is designed to do, which is to simplify the process of plotting group-wise point estimates and user defined error bars/intervals around the point estimates.

In your case, these intervals would be standard deviations around each of the group means as you have indicated.

Review the examples in ?plotmeans.

As Martin and others have pointed out, you need to remove boxplots from the equation here, as they were not designed to plot means and standard deviations.

HTH, Marc Schwartz mailing list PLEASE do read the posting guide! Received on Fri Dec 02 07:07:24 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:25 EST