[Rd] Creating functions programmatically
h.wickham at gmail.com
Wed Oct 3 16:49:57 CEST 2012
On Wed, Oct 3, 2012 at 9:33 AM, Gabriel Becker <gmbecker at ucdavis.edu> wrote:
> You could do this:
> make_fun = function(args, body, env)
> f = function()
> formals(f) = args
> body(f) = body
> environment(f) = env
> If for some reason using function() itself as Duncan suggested won't work.
Oh that's an approach that's easier to explain to others - thanks!
RStudio / Rice University
More information about the R-devel