One of the many functions in R to plot means and confidence intervals. Meant mainly for demonstration purposes for showing the probabilty of replication from multiple samples. Can also be combined with such functions as boxplot to summarize distributions.
x <- matrix(rnorm(500),ncol=20)
error.bars(x)
#now do a boxplot and then add error barsx.df <- as.data.frame(x)
boxplot(x.df)
error.bars(x.df, add=TRUE)