1

I'm trying to unpack list of objects from r functio results as follows:

Unpack_daily_lists <- function (daily_lists) {

my_names <- c("a","b","c")
for (i in 1:length(daily_lists)) { 
return(assign(my_names[i], daily_lists[[i]]))
}}

But it doesn't work.. Your help will be appreciated.

staove7
  • 560
  • 5
  • 18
  • You may need to change the `assign` statement with `envir = .GlobalEnv` i.e. `assign(my_names[i], daily_lists[[i]], envir = .GlobalEnv)` – akrun Apr 27 '17 at 07:02
  • Paste to us your error message and maybe the str of the object that fills the daily_lists argument – Evan Friedland Apr 27 '17 at 07:05

0 Answers0