I would like to define a recursive equivalent to call or do.call, which takes
a vector of multiple function names and 'chains' them, by greedy matching of
arguments down the chain. For example, I would like to be able to do:

rec.do.call(c("glm","coef","print), list(formula=dist~speed, digits=3,
data=cars));

which would then be equivalent to:

print(coef(glm(formula=dist~speed, data=cars)), digits=3);

I've been playing around with a recursive function with ellipses, but I
can't wrap my head around it.

--
View this message in context: 
http://r.789695.n4.nabble.com/recursive-do-call-tp3353074p3353074.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

Reply via email to