RE: [R] Slow computation in for loop

2003-05-30 Thread Philippe Grosjean
Philippe Grosjean wrote: I suspect that your problem comes from the rbind(). I have also noticed an exponentially slower execution with the increase of the size of the data frame that you rbind()s. It is much faster to rbind() several separated temporary data frames (let's say, ten by ten

RE: [R] Slow computation in for loop

2003-05-29 Thread Liaw, Andy
:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 4:30 AM To: [EMAIL PROTECTED] Subject: [R] Slow computation in for loop Dear members, I'm using R to do some test computation on a set of parameters of a function. This function is included in three for() loops, first one

Re: [R] Slow computation in for loop

2003-05-29 Thread Ross Ihaka
Philippe Grosjean wrote: I suspect that your problem comes from the rbind(). I have also noticed an exponentially slower execution with the increase of the size of the data frame that you rbind()s. It is much faster to rbind() several separated temporary data frames (let's say, ten by ten loops),

[R] Slow computation in for loop

2003-05-28 Thread Yves Brostaux
Dear members, I'm using R to do some test computation on a set of parameters of a function. This function is included in three for() loops, first one for replications, and the remaining two cycling through possible parameters values, like this : for (k in replicates) { data - sampling from

Re: [R] Slow computation in for loop

2003-05-28 Thread Peter Dalgaard BSA
Yves Brostaux [EMAIL PROTECTED] writes: Dear members, I'm using R to do some test computation on a set of parameters of a function. This function is included in three for() loops, first one for replications, and the remaining two cycling through possible parameters values, like this :

Re: [R] Slow computation in for loop

2003-05-28 Thread Yves Brostaux
First of all, thank you for your response. I actually have to refine my pseudocode. 'result' is a numerical vector of length 7, and is binded with whole results through an rbind() : for (k in replicates) { data - sampling from a population for (i in param1) { for (j in param2) {

RE: [R] Slow computation in for loop

2003-05-28 Thread Prof Brian Ripley
On Wed, 28 May 2003, Philippe Grosjean wrote: I suspect that your problem comes from the rbind(). I have also noticed an exponentially slower execution with the increase of the size of the data frame that you rbind()s. It is much faster to rbind() several separated temporary data frames