Skip to content
Prev 257003 / 398506 Next

Extract information from the names of a list within lapply

Try this:

lapply(mtcars, function(.)names(mtcars)[match.call()[[2]][[3]]])
On Fri, Apr 15, 2011 at 3:14 PM, Jun Shen <jun.shen.ut at gmail.com> wrote: