At 18:17 28.09.2009, hadley wickham wrote:
> 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
A theoretical question, as you are not responsible for lapply: would
you think that problems arise, if lapply would name each list object
with it's name as it calls the function in it's body, instead of
naming it "X[[1L]]", ... ?
Heinz
--
http://had.co.nz/
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.