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