Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unlist a list of dataframes

Tags:

r

This is possibly a really simple question. I have a list of dataframes (df1, df2.... dfn), i.e. each element of the list is a dataframe. So basically, the list was created like this:

mylist = list(df1, df2,...., dfn) 

But how do I do the reverse, that is unlist so that df1, df2, etc. reside separately in the workspace?

like image 893
user702432 Avatar asked Jul 17 '13 10:07

user702432


1 Answers

Use list2env it is specially designed for this:

From a named list x, create an environment containing all list components as objects, or “multi-assign” from x into a pre-existing environment.

So here :

list2env(mylist ,.GlobalEnv) 
like image 76
agstudy Avatar answered Oct 17 '22 05:10

agstudy