From hadley at rice.edu  Sun Jun  5 05:53:03 2011
From: hadley at rice.edu (Hadley Wickham)
Date: Sat, 4 Jun 2011 20:53:03 -0700
Subject: [Rd] call / do.call expression too big
In-Reply-To: <1307227756588-3574335.post@n4.nabble.com>
References: <1307227756588-3574335.post@n4.nabble.com>
Message-ID: <BANLkTinsGyUwiCiXMiOJLY9H0PfV5016Dw@mail.gmail.com>

> 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/



[Rd] call / do.call expression too big
Hadley Wickham