Access lapply index names inside FUN

Unfortunately, lapply only gives you the elements of the vector you pass it. The usual work-around is to pass it the names or indices of the vector instead of the vector itself. But note that you can always pass in extra arguments to the function, so the following works: x <- list(a=11,b=12,c=13) # Changed to … Read more