[R] Alternative to aggregate() for averaging
Sebastien Durand
sebastien.durand at umontreal.ca
Fri Apr 22 21:43:50 CEST 2005
Hello,
I am working with very large matrices 10000 by 2000
and for each row I have a grouping vector and I
would like to average each row by groups...
Presently I am using this command and it behaves
correctly even with NA values is the groupvector:
data<-aggregate(mymatrix,list(groupvector),mean)
Is there a faster method
Thanks!
Sébastien
--
Sébastien Durand
Maîtrise en biologie
Université de Montréal
(514) 343-6864
Université du Québec à Montréal
(514) 987-3000 (1572#)
More information about the R-help
mailing list