Schwarz,Paul wrote:

Hi,

I've been passing the hist() function to tapply() to quickly generate histograms based 
on the list of factors supplied to tapply().  However, I have not figured out how to 
generate titles for each of the histograms, which paste in the unique values of the 
list factors as part of the histogram title.  I'm hoping that someone can tell me how 
to do this.

Thanks for your time and consideration,

-Paul Schwarz

______________________________________________
[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




I can't see it with talpply, but mapply and split works:

test <- rnorm(1000)
fac <- factor( rep(1:5, 200))
par(mfrow=c(2,3))
mapply(hist, split(test, fac), main=levels(fac))


--

Kjetil Halvorsen.

Peace is the most effective weapon of mass construction.
              --  Mahdi Elmandjra

______________________________________________
[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