[R] how can I do loop in array?

SU SU su.113 at osu.edu
Sun May 14 20:51:33 CEST 2006


I have two matrix: matrix A is 18 by 18 and Matrix B is 18 by 2, I want to multiply them and get new matrix. Then matrix A will multiply the new matrix again, I want to do it 100 times. Can I do it by making matrix B as an array with 18 by 2 by 100 dimension? I can not figure out how to do the loop? using apply?
Thanks a lot!
Su Su




More information about the R-help mailing list