Hi,

I'd like to draw a lattice barchart of means with error bars to show
the standard deviation. I have the barchart, how do I add the error
bars?

require(datasets)
require(lattice)
x <- aggregate(weight ~ Diet, ChickWeight, function(x) c(mean=mean(x),
sd=sd(x)))
barchart(weight[,'mean'] ~ Diet, x)

Thanks,
Shaun

______________________________________________
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.

Reply via email to