Re: [R] call a variable from outside of for loop

2013-04-23 Thread Berend Hasselman
tmail.com >> CC: r-help@r-project.org >> Subject: Re: [R] call a variable from outside of for loop >> >> Hello, >> >> It seems that you're recreating the variable 'e' every time through the >> loop. In the end you only have 1 row. Try to c

Re: [R] call a variable from outside of for loop

2013-04-23 Thread Jeff Newmiller
To be clear, the reproducible example should show us what the problem behavior is, and should be supplemented with some artificially-generated data that shows what you want to get. (We don't expect you to know the answer already.) http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-

Re: [R] call a variable from outside of for loop

2013-04-23 Thread eliza botto
Dear Rui,it worked...thanks indeed for you timely responce elisa > Date: Tue, 23 Apr 2013 13:09:58 +0100 > From: ruipbarra...@sapo.pt > To: eliza_bo...@hotmail.com > CC: r-help@r-project.org > Subject: Re: [R] call a variable from outside of for loop > > Hello, >

Re: [R] call a variable from outside of for loop

2013-04-23 Thread Rui Barradas
Hello, It seems that you're recreating the variable 'e' every time through the loop. In the end you only have 1 row. Try to create it outside the loop, like e <- vector("list", 35) Then inside the loop e[[i]] <- print(...) Hope this helps, Rui Barradas Em 23-04-2013 12:21, eliza botto es

Re: [R] call a variable from outside of for loop

2013-04-23 Thread Berend Hasselman
On 23-04-2013, at 13:21, eliza botto wrote: > Dear useRs, > While using print command in "for" loop, i designated a variable being > printed by "e". Although the output was shown inside the loop but when i > tried to call the variable outside the loop it only gave the first row, where > as it