Re: [R] Use apply on a function with multiple argument including a matrix ?

2011-05-27 Thread sunelav
Dear David, Thank you very much for your answer. I am going to try what you propose and compare the two methods. I have already done what I could to reduce the computation time of the function by using apply functions and by doing most of the calculation on matrices at once to avoid the use of

Re: [R] Use apply on a function with multiple argument including a matrix ?

2011-05-27 Thread David Winsemius
On May 27, 2011, at 3:34 PM, sunelav wrote: Hello, I wrote a function that takes a matrix M and several numeric parameters as arguments. It returns a square matrix (same number of rows than M). I need to use this function n times (n>1000) with random parameters. Just one matrix M and ma

[R] Use apply on a function with multiple argument including a matrix ?

2011-05-27 Thread sunelav
Hello, I wrote a function that takes a matrix M and several numeric parameters as arguments. It returns a square matrix (same number of rows than M). I need to use this function n times (n>1000) with random parameters. I would like to increase the speed of this computation in order to increase t