For a while I’ve been looking for a way to add error bars in R. It’s actually not that trivial in some cases, and I think that I wrote my own m-script to do it in matlab for bar plots.

At any rate, Google is my friend, and I found a really good post detailing how to do this. In a nutshell, just grab the gplots package and look at the plotCI function. Works great. The only thing I had to tweak was that the uiw is how far from the mean value you want to go (say, S.E., and not mean + S.E.).

Nice.