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
I don't know if this will help you or not, but might worth a try. You can
replace the two inner for loops with nested calls to sapply(). For example:
sapply(1:5, function(x) sapply(6:10, function(y) x+y))
[,1] [,2] [,3] [,4] [,5]
[1,]789 10 11
[2,]89 10 11 12
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),
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 :
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) {
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