n(x) {
> assign(x, mydata[[x]], pos = .GlobalEnv)
> })
>
> HTH,
>
> Josh
>
> On Sat, Apr 23, 2011 at 10:51 AM, Nick Mosely wrote:
>> Hello R-world,
>>
>> I have multiple variables that have been generated within a function.
>> I would like to assig
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
2 matches
Mail list logo