Skip to content
Prev 30795 / 398513 Next

accessing current factor in tapply

Bernie McConnell wrote:
I think it would be easier and more foolproof to use a for loop:

cc <- 1:10
ff <- rep(c("a", "b"), 5)
par(mfrow = c(1, 2))
for(f in unique(ff))
   hist(cc[ff==f], main = as.character(f))

Regards,
Sundar