[R] Boxplot BUT with Mean, SD, Max & Min ?
phil at pricom.com.au
Mon Sep 26 18:11:47 CEST 2011
On 2011-09-27 00:35, Gabor Grothendieck wrote:
> On Mon, Sep 26, 2011 at 9:56 AM, Philip Rhoades <phil at pricom.com.au>
>> It appears that there is no way of getting Boxplots to plot using
>> Mean, SD,
>> Max & Min - is there something else that would do what I want? I
>> find it . .
> Try replacing the stats component of boxplot's output with your
> desired statistics and then feeding that into the lower level bxp
> function to do the graphics:
> bp <- boxplot(Nile, plot = FALSE)
> bp$stats <- matrix(c(min(Nile), mean(Nile) + c(-1, 0, 1) * sd(Nile),
Thanks for that! What is the syntax when there is more than one set of
data (ie a two dimensional vector)? I tried messing around with stuff
but I get subscript out of range errors . .
GPO Box 3411
Sydney NSW 2001
E-mail: phil at pricom.com.au
More information about the R-help