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#)

______________________________________________
R-help@stat.math.ethz.ch 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