Skip to content
Prev 206767 / 398503 Next

column selection for aggregate()

Hi

If I really wanted aggregate all numerics by all non numerics this is how 
I would do it

my.numerics <- which(sapply(zeta, is.numeric))
my.factor <- which(sapply(zeta, is.factor))
aggregate(zeta[, my.numerics], zeta[, my.factor], mean)

Regards
Petr



r-help-bounces at r-project.org napsal dne 18.01.2010 16:33:17:
http://www.R-project.org/posting-guide.html