From hadley at rice.edu  Mon Jun  6 01:27:40 2011
From: hadley at rice.edu (Hadley Wickham)
Date: Sun, 5 Jun 2011 16:27:40 -0700
Subject: [Rd] call / do.call expression too big
In-Reply-To: <BANLkTi=KZ9RWr1+S_yMOCVoDgFgC2uNpKw@mail.gmail.com>
References: <1307227756588-3574335.post@n4.nabble.com>
	<BANLkTinsGyUwiCiXMiOJLY9H0PfV5016Dw@mail.gmail.com>
	<BANLkTi=KZ9RWr1+S_yMOCVoDgFgC2uNpKw@mail.gmail.com>
Message-ID: <BANLkTim19incxwCFLSo-dq3tiPQQ6+n2qg@mail.gmail.com>

On Sun, Jun 5, 2011 at 4:25 PM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu> wrote:
>> argn <- lapply(names(args), as.name)
>> names(argn) <- names(args)
>>
>> call <- as.call(c(list(as.name("lm")), argn))
>> eval(call, args)
>
> Great, almost! Is there any way I can explicitly specify the package of the
> function in this way? I tried replacing "lm" with "stats::lm" but that did
> not work.

Hmmm, not sure.  Maybe something like: call("::", as.name("stats"),
as.name("lm"))

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