Message-ID: <4978D694.3070002@web.de>
Date: 2009-01-22T20:27:00Z
From: Thomas Schwander
Subject: looping over a string
In-Reply-To: <B37C0A15B8FB3C468B5BC7EBC7DA14CC61C8416F73@LP-EXMBVS10.CO.IHC.COM>
Greg Snow schrieb:
> I don't see right off why the one works and the other doesn't, but this looks like one of those cases that would be better done using a list rather than global variables.
>
> Instead of assigning the variables in the global workspace, create a list and assign them there. Then you can use lapply instead of a loop and you avoid the potential pitfalls associated with globals.
>
> Hope this helps,
>
>
Greg,
thanks for the answer. The difference is, that in the first case I
assign a value to a "string", but afterwards I want to read the value of
the "string".
Trying to get it with lists.
Cheers,
Thomas