Re: [Rd] call / do.call expression too big

From: Hadley Wickham <hadley_at_rice.edu>
Date: Sat, 04 Jun 2011 20:53:03 -0700

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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sun 05 Jun 2011 - 03:55:43 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 05 Jun 2011 - 23:40:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive