This question already has an answer here:
In Python, one can do this:
>>> a, b, c = (1, 2, 3)
>>> a
1
>>> b
2
>>> c
3
Is there a way to do it in R, as below?
> a, b, c = c(1, 2, 3)
This question already has an answer here:
In Python, one can do this:
>>> a, b, c = (1, 2, 3)
>>> a
1
>>> b
2
>>> c
3
Is there a way to do it in R, as below?
> a, b, c = c(1, 2, 3)
maybe it looks stupid, but I would do this :
You can do this within a list using
[<-
Or within a data.table using
:=
With both of these (lists), you could then use
list2env
to copy to the global (or some other) environmentBut not in general usage creating objects in an environment.