On Wed, 2008-10-08 at 09:49 -0700, Dylan Beaudette wrote: > 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)
I guess personal preference but I prefer a layout that has them overlapping - visual comparison is easier. E.g.: require(sciplot) lineplot.CI(response=len, x.factor=dose, group=supp, data = ToothGrowth) If detail of the distributions are needed, the graphs you suggest are certainly warranted! > > -- http://mutualism.williams.edu
signature.asc
Description: This is a digitally signed message part
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.