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
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-
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,
>
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
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
5 matches
Mail list logo