[Solved] Split a group of lists R [closed]


Suppose you have a list of lists, and each element is named:

ll <- list(jan = list(1:3),
           feb = list(4:6),
           mar = list(7:9))
ls()
# [1] "ll"

You can use list2env to assign the list components into the global environment:

list2env(ll, globalenv())
ls()
# [1] "feb" "jan" "ll"  "mar"

jan
# [[1]]
# [1] 1 2 3

2

solved Split a group of lists R [closed]