How to get the name of a data.frame within a list?
问题 How can I get a data frame's name from a list? Sure, get() gets the object itself, but I want to have its name for use within another function. Here's the use case, in case you would rather suggest a work around: lapply(somelistOfDataframes, function(X) { ddply(X, .(idx, bynameofX), summarise, checkSum = sum(value)) }) There is a column in each data frame that goes by the same name as the data frame within the list. How can I get this name bynameofX ? names(X) would return the whole vector.