Is there a way to get the list index name in my lapply() function?
n = names(mylist) lapply(mylist, function(list.elem) { cat(\"What is the name of this list
Just loop in the names.
sapply(names(mylist), function(n) { doSomething(mylist[[n]]) cat(n, '\n') }