[Rd] call / do.call expression too big

Hadley Wickham hadley at rice.edu
Sun Jun 5 05:53:03 CEST 2011


> I completely understand why this happens, yet I was wondering if there is an
> alternative to call/do.call that constructs the call in an different way so
> that the actual call object is somewhat more compact and does not contain
> all the data that was involved in the function. For example one that
> attaches the args list in an environment and constructs a call that refers
> to these objects or something similar.

Like this?

argn <- lapply(names(args), as.name)
names(argn) <- names(args)

call <- as.call(c(list(as.name("lm")), argn))
eval(call, args)

Hadley


-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



More information about the R-devel mailing list