I have a nested list:
nested_list <- list(a = c(1,2), b = list( c = c(3,4), d = list( e = c(5,6,7) )))
I want to simplify it so that it looks like this (only one level, nested names are grouped using colons):
simplified_list <- list(a = c(1,2), "b:c" = c(3,4), "b:d:e" = c(5,6,7) )
What is the best way to do this?
list r
nachocab
source share