[R] A matrix multiplication

Jose Luis Aznarte M. jlaznarte at decsai.ugr.es
Thu Sep 27 19:08:08 CEST 2007


Dear all,
    I'm having trouble using the 'apply' function to multiply some 
arrays. Let A be a 500x2 array and B a 500x3 array. I need a vector C 
which has 6 columns being the first three the result of A[,1] * B and 
the second three the result of A[,2] * B. What is the most efficient way 
to express that? I'm trying to use 'apply' with no success...
    Thanks for your help!

 
--                                                      --
Jose Luis Aznarte M.       http://decsai.ugr.es/~jlaznarte
Department of Computer Science and Artificial Intelligence
Universidad de Granada           Tel. +34 - 958 - 24 04 67
GRANADA (Spain)                  Fax: +34 - 958 - 24 00 79



More information about the R-help mailing list