Re: [R] create an object in a loop (v2)

2010-02-01 Thread David Winsemius
On Feb 1, 2010, at 12:33 PM, Ivan Calandra wrote: I have a follow-up question: I use assign() to store some value in my paste()-created object as suggested: for (i in 1:3) { assign(paste("object", i, sep=""), c("a", "b", "c")) } Then I would like to change the names of the elements of that

Re: [R] create an object in a loop (v2)

2010-02-01 Thread Ivan Calandra
I have a follow-up question: I use assign() to store some value in my paste()-created object as suggested: for (i in 1:3) { assign(paste("object", i, sep=""), c("a", "b", "c")) } Then I would like to change the names of the elements of that object within the loop. Since it is all in a loop,

Re: [R] create an object in a loop (v2)

2010-02-01 Thread Ivan Calandra
To answer to the problem, assign() does what I need, thanks a lot! In any case, for that kind of things, I don't think a sample dataset would be needed, and indeed it was not, which is why I didn't attach it. Honestly, I thought that you would need more info on what I intend to do, but it pro

Re: [R] create an object in a loop (v2)

2010-02-01 Thread David Winsemius
Upon reading it yesterday, it appeared as it would have required some serious testing and there was no data on which to do any work. You were clearly not taking the time to isolate the problem and construct a dataset. But who knows? When you say "What I want to do is. ... ,I would like the

[R] create an object in a loop (v2)

2010-02-01 Thread Ivan Calandra
Hi everybody, I'm kind of surprised that I didn't get any answer to my question... Is it not interesting? Is it not well explained? Am I doing something wrong? Was it lost in the hundreds of other emails during the weekend? I hope it is because of my last guess. So I'll just send the email ag