[R] newbie question: ROW average

From: A Ezhil <ezhil02_at_yahoo.com>
Date: Mon 29 May 2006 - 21:24:51 EST


Hi,

I am new to R programming. I have a 992 x 74 matrix. I would like to form a new matrix by averging each 4 rows
from the original one. How can I use 'apply' instead of usual mean inside the nested for loop?

Thanks in advance.

regards,
ezhil



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 Received on Mon May 29 21:35:35 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 30 May 2006 - 00:10:23 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.