On Sun, Jun 5, 2011 at 4:25 PM, Jeroen Ooms <jeroen.o...@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/

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to