[R] Plot means with error bars - A novice needs help

Dylan Beaudette dylan.beaudette at gmail.com
Wed Oct 8 18:49:10 CEST 2008


On Wednesday 08 October 2008, Manuel Morales wrote:
> Another option is bargraph.CI or lineplot.CI from the package sciplot.
>
> See http://mutualism.williams.edu/sciplot for examples.
>
> On Tue, 2008-10-07 at 23:31 -0500, Michael Just wrote:
> > Hello,
> > I'd appreciate a suggestion on how to construct plots (barplots?) that
> > use means on the Y axis instead of density/count. I'd also like to use
> > groups and plot error or confidence interval bars on these graphs. I know
> > this is a read the manual situation. I'd appreciate help with what to
> > read, or your benevolence with some sample code.
> >
> > I've looked at lattice and gplots2, but given my beginner status my
> > efforts are not propelling me very far.
> >
> > Thank you kindly,
> > Michael Just

# Personally, this looks more informative to me:
library(lattice)
bwplot(len ~ supp | factor(dose), data=ToothGrowth, layout=c(3,1))

# and some people like this:
require(Hmisc)
bwplot(supp ~ len | factor(dose), data=ToothGrowth, layout=c(3,1), 
panel=panel.bpplot, datadensity=TRUE)



-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341



More information about the R-help mailing list