[R] Matrix manipulation
markku.karhunen at ktl.fi
Mon Apr 16 17:10:46 CEST 2007
Agreed. What Petr Pikal wrote, works exactly, so thank you all!
> It would be helpful if you could be more specific of what exactly
> you'd like to compute. Have a look also at the posting guide available
> Dimitris Rizopoulos
> Ph.D. Student
> Biostatistical Centre
> School of Public Health
> Catholic University of Leuven
> Address: Kapucijnenvoer 35, Leuven, Belgium
> Tel: +32/(0)16/336899
> Fax: +32/(0)16/337015
> Web: http://med.kuleuven.be/biostat/
> ----- Original Message ----- From: "Markku Karhunen"
> <markku.karhunen at ktl.fi>
> To: <r-help at stat.math.ethz.ch>
> Sent: Monday, April 16, 2007 2:52 PM
> Subject: [R] Matrix manipulation
>> 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,
>> R-help at stat.math.ethz.ch mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
More information about the R-help