x <- matrix(rnorm(500),ncol=20)
error.bars(x)
#now do a boxplot and then add error bars
x.df <- as.data.frame(x)
boxplot(x.df)
error.bars(x.df, add=TRUE)
error.bars(attitude) #another example
error.bars(attitude,bar=TRUE) #show the use of bar graphs
#combine with boxplot
boxplot(attitude)
error.bars(attitude,add=TRUE)
#combine with a strip chart
stripchart(attitude,vertical=TRUE,method="jitter")
error.bars(attitude,add=TRUE,arrow.len=.2)
Run the code above in your browser using DataLab