x <- replicate(20,rnorm(50))
boxplot(x,notch=TRUE,main="Notched boxplot with error bars")
error.bars(x,add=TRUE)
abline(h=0)
error.bars(attitude,alpha=.5,main="50 percent confidence limits") #another example
error.bars(attitude,bar=TRUE) #show the use of bar graphs
#combine with a strip chart
stripchart(attitude,vertical=TRUE,method="jitter",main="Stripchart with 95 percent confidence limits")
error.bars(attitude,add=TRUE,arrow.len=.2)
Run the code above in your browser using DataLab