[R] adding error bars

Jim Lemon jim at bitwrit.com.au
Thu Jan 27 11:29:01 CET 2011


On 01/27/2011 05:04 AM, ogbos okike wrote:
> Dear all,
> I am trying to add error bars on a boxplot but have encountered an error as
> indicated below. Is there a package I need to install or a library I have to
> load before this goes please.
> Thanks for any idea.
> Ogbos
>
> x<-replicate(20,rnorm(50))
>   boxplot(x,notch=TRUE,main="Notched boxplot with error bars")
>   error.bars(x,add=TRUE)
> Error: could not find function "error.bars"

Hi Ogbos,
Adding "error bars" is easy, but as Josh pointed out, may not mean much. 
If you are seeking to illustrate a confidence interval for the median, 
it may be better to use points or symbols and error bars rather than 
boxplots.

Jim



More information about the R-help mailing list