[R] adding error bars
Joshua Wiley
jwiley.psych at gmail.com
Wed Jan 26 19:26:41 CET 2011
Hi,
You will find package "sos" has some handy functions for searching for
functions/packages:
###########################
install.packages("sos")
require(sos)
findFn("error.bars")
###########################
Perhaps the "psych" package has the error.bars() function you are thinking of?
As a side note, I am not sure it makes much sense to add error bars to
a boxplot---it already includes 25th/75th percentiles (at least
approximately, some use hinges, etc. but same general idea), and
typically minimum and maximum scores. What would the error bars add
to that picture that would aid a viewer in understanding the
distribution of your data or the difference between different sets of
data? In other words, is the information conveyed over and above the
boxplots large enough to warrant the additional clutter, possible
confusion, and necessary key/description in your figure caption so
viewers know what they are looking at? Just something to think about.
Cheers,
Josh
On Wed, Jan 26, 2011 at 10:04 AM, ogbos okike <ogbos.okike at gmail.com> 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"
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/
More information about the R-help
mailing list