[R] Matrix manipulation

Markku Karhunen markku.karhunen at ktl.fi
Mon Apr 16 14:52:55 CEST 2007


This is a very basic question, but apparently I am too stupid for it.

I have a large matrix A, and I need to avoid for loops. How could I 
apply a function f(a,r,c) on each element of A, using the subscript (row 
and column) of a as the other arguments?

Thanks in advance,
Markku Karhunen
National Public Health Institute,

More information about the R-help mailing list