[R] adding SE to bar plots

Marc Schwartz mschwartz at medanalytics.com
Tue Nov 19 23:05:42 CET 2002

On Tue, 2002-11-19 at 17:28, Bill Shipley wrote:
> Hello.  I know that one can add standard errors to a bar plot by repeated 
> use of the lines() function, but this can be long when there are many 
> bars.  I wonder if there is not already some other function that does this 
> automatically?
> Bill Shipley
> Departement de biologie
> Universite de Sherbrooke
> Sherbrooke (Quebec) CANADA J1K 2R9
> Bill.Shipley at USherbrooke.ca
> http://callisto.si.usherb.ca:8080/bshipley/

You can either use segments() or arrows() to add SE/CI lines to a


You can use barplot2(), which is in the gregmisc package on CRAN. It is
an enhanced version of barplot() that supports the above and other
features like log scaled axes, grid lines and more. If you go this route
and have any questions on barplot2(), let me know.


Marc Schwartz

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list