[R] adding SE to bar plots

Marc Schwartz
2002-11-19T22:05:42Z

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
barplot().

Or...

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.

Regards,

Marc Schwartz