Return elements of list as independent objects in global environment

There is special function for mapping list to environment:

> obj <- list(a=1:5, b=2:10, c=-5:5)
> ls()
[1] "obj"
> list2env(obj,globalenv())
<environment: R_GlobalEnv>
> ls()
[1] "a"   "b"   "c"   "obj"

P. S. It is my comment provided as an answer

Leave a Comment