[R] call a variable from outside of for loop
Berend Hasselman
bhh at xs4all.nl
Tue Apr 23 14:06:48 CEST 2013
On 23-04-2013, at 13:21, eliza botto <eliza_botto at hotmail.com> 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 should have 35 rows as it showed inside loop.The command which i used in the loop is
> e<-print(sum(abs(b-m[,i])))
Give us a reproducible example of what you are trying to do.
This doesn't make sense.
Berend
More information about the R-help
mailing list