accessing and preserving list names in lapply
res <- lapply(1:length(L),do.one)
Actually, I do res <- lapply(:length(L),function(x)do.one(L[x])) -- this is the price of needing the element's name, so I have to both make do.one extract the name and the meat separately inside, and lapply becomes ugly. Yet the obvious alternatives -- extracting the names separately, attaching them back into list elements, etc., -- are even uglier. Something pretty? :) Cheers, Alexy