[R] How to assess object names within a function in lapply or l_ply?

hadley wickham h.wickham at gmail.com
Mon Sep 28 18:17:39 CEST 2009


> many thanks for your answer and for the enormous work you put into plyr, a
> really powerful package.
> For now, I will solve my problem with a variable label attribute, I usually
> attach to columns in data frames. I asked the list, because I thought, I am
> overlooking something trivial, since lapply itself apparently "knows" the
> object names, as it labels the output by them. It just does not supply them
> to the function it calls.

lapply knows the names - the calling function doesn't - it takes the
output add then fixes up the names after it's run.

Hadley


-- 
http://had.co.nz/




More information about the R-help mailing list