[R] box-whisker plot from pre-summarized data?

hadley wickham h.wickham at gmail.com
Tue Sep 30 00:20:21 CEST 2008


On Mon, Sep 29, 2008 at 4:27 PM, Avram Aelony <aavram at mac.com> wrote:
> Hello,
>
> Although my summary descriptives are generated outside of R (dataset is
> huge), I would like to produce a box-whisker plot using bxp or perhaps a
> function from the ggplot2 library using the precomputed summaries.

You should be able to do it like:

+ geom_boxplot(aes(ymin = lower.whisker, lower=lower.hinge,
middle=median, upper=upper.hinge, ymax=upper.whisker), stat =
"identity")

(where lower.whisker etc are the variables from your precomputed data set)

and then add on the outliers with geom_point

Hadley

-- 
http://had.co.nz/



More information about the R-help mailing list