[R] Error message when using error.bars(x,add=TRUE)

fussel anna.seither at gmx.de
Thu Feb 18 16:22:46 CET 2010


Hey hey,
I`m analyzing a data set containing the element contentrations of various
samples...
I wanted to construct notched boxplots and got quite ugly results for some
of the boxplots. The notches are often larger then the hinges which resulted
in weird looking edges (even though I`m using a log-boxplot). To avoid this
problem I thought about using "normal" log-boxplots and adding some kind of
parantheses for showing the confidence interval.
I found an option to do this with the help of the package "psych".

It works beautifully for sth like that:
x <- replicate(20,rnorm(50))
boxplot(x,notch=TRUE,main="Notched boxplot with error bars")
error.bars(x,add=TRUE)
abline(h=0)

I tried to apply this to my own dataset:

## Ag
boxplotDAS(log10(Ag)~Aquifer,ylab="",xlab="Ag (mg/l)", main="",
data=samples, notch=TRUE, horizontal=TRUE, xaxt="n", col="gray85")
error.bars(samples,add=TRUE)
axis(1,at=log10(a<-sort(c((10^(-50:50))%*%t(c(1,5))))),labels=a, tick=T)
abline(v=log10(a),lty=3,col='gray')


I end up with lots of error messages - all of them saying: 

Warning in arrows(s[s], x.stats$mean[s] - ci[s] * x.stats$se[s], s[s],
x.stats$mean[s] +  :
  zero-length arrow is of indeterminate angle and so skipped

What does that mean and how can I get rid of it? Any ideas?

Thanks a lot,
fussel

-- 
View this message in context: http://n4.nabble.com/Error-message-when-using-error-bars-x-add-TRUE-tp1560278p1560278.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list