Thank you for your help. That works for me.
On Sat, Apr 23, 2011 at 1:53 PM, Joshua Wiley wrote:
> Hi Nick,
>
> It is typically not a good idea to write functions that automatically
> assign variables to the global environment (makes it easy to overwrite
> something valuable without knowing you a
Hi Nick,
It is typically not a good idea to write functions that automatically
assign variables to the global environment (makes it easy to overwrite
something valuable without knowing you are overwriting it), but if
that is really the best choice for your situation, I would do
something like (ins
Hello R-world,
I have multiple variables that have been generated within a function.
I would like to assign them each to the Global Environment. I've tried
the following:
x = 1
y = 2
z = 3
for (i in c(x,y,z)) {
assign("i",i,pos=.GlobalEnv)
}
i
[1] 3
Obviously, the problem is that the code is a
3 matches
Mail list logo