I have this list:
l <- list(
a = list(v1 = "value1",
v2 = "value2"),
b = "something",
c = list(v1 = "value3",
v2 = "value4",
v3 = list(
t1 = "value5",
t2 = "value5")
)
)
attr(l$b, "a1") <- "att1"
attr(l$c, "a1") <- "att2"
I want to: (1) print every name in the list; (2) print every value in the list; and (3) print every attribute in the list. It would be great if I could do: map(l, names, recursive = TRUE), a la the recursive option in list.files and dir. But that's not possible, as far as I can tell.