Hi,

I was wondering if there is a ready made function or parameter
for indicating the sample size in boxplots?

Here's what I came up with so far:

library(ISwR)
data(energy)
attach(energy)
boxplot(expend~stature)
sample.size <- tapply(expend, stature, length)
sample.size <- paste("N=", sample.size, sep="")
mtext(sample.size, at=1:length(unique(stature)), line=2, side=1)

TIA,

Patrick
-- 
"What happens if a big asteroid hits Earth ? Judging from
 realistic simulations involving a sledge hammer and a common
 laboratory frog, we can assume it will be pretty bad."
                                                -- Dave Barry

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to