Skip to content
Prev 321289 / 398500 Next

Boxplot Labels

Hello,

The construct data.frame(cbind(...)) is not at all needed, the following 
is much better.

dat1 <- data.frame(num, ave)


Also, I've modified the text() call a bit, in order to have R tell the 
dat1$num corresponding to the (unique) max of ave, and with an extra 
argument, pos. This would allow for placement of the label near the point.

p <- boxplot(dat1$ave, data= dat1, main= "Average Size", yaxt = "n")
text(1, , y = max(dat1$ave), label = dat1$num[which.max(dat1$ave)], cex 
= .7, pos = 4)


Hope this helps,

Rui Barradas


Em 09-04-2013 16:44, John Kane escreveu: