[R] Multiplying elements of a list by rows of a matrix

Clemontina Davenport ckalexa2 at ncsu.edu
Mon Nov 12 15:36:13 CET 2012


Thank you all for your responses, the lapply works perfectly. The
example I gave IS odd. I only realized after I posted that tt had 5
rows and should have only had 3, so I apologize for that (I initially
had X to have 5 list elements).

Bert, I tend to use for loops in excess and often unnecessarily, so I
am trying to learn to code without the mental crutch that for loops
solve all problems.
Thanks again,
Tina




More information about the R-help mailing list