[R] Creating a box plot with whiskers when I only have mean, sd and n

Rolf Turner r.turner at auckland.ac.nz
Fri Mar 14 03:31:22 CET 2014


On 14/03/14 08:52, Frederik Borup wrote:
> Dear all,
>
> I want to create a boxplot with whiskers. I want to compare several
> studies. For each study I have
>
>     1. mean
>     2. standard deviation (sd)
>     3. name
>     4. number of observations (n)
>
> How can i do this in R ?
>
> normally I would type
>> bxp
> or
>> boxplot
>
> but this is not allowed when I only know mean and sd.

(1) Read the help for bxp.
(2) Think about what you want your box and whiskers to *represent* given 
that you only know the summary statistics.  (Is it *really* meaningful 
to create a boxplot in such circumstances?)
(3) If you can figure that out, then create an appropriate argument (a 
list) for bxp() and call bxp() with that argument.

cheers,

Rolf Turner




More information about the R-help mailing list