In R, how to make each dataframe generated in foreach loop available as individual dataframes in global environment
I was only able to save them into a list (x), but the list is of 3 layers; there are over 40,000 dataframes, and unpacking them is very time consuming.
x <- foreach(q=1:countq, .export = ls(globalenv())) %do% {
foreach(p=1:countp, .export = ls(globalenv())) %do% {
foreach(o=1:countero, .export = ls(globalenv())) %dopar% {
n<-rbind(df_o, df_p, df_q)
}
}
It would be nice to have dataframes n1, n2, n3, ... till n40000 from this nested foreach loop.