Err, typo: "function()" should of course say "function() {}"
~G On Wed, Oct 3, 2012 at 7:49 AM, Hadley Wickham <h.wick...@gmail.com> wrote: > On Wed, Oct 3, 2012 at 9:33 AM, Gabriel Becker <gmbec...@ucdavis.edu> > wrote: > > Hadley, > > > > You could do this: > > > > make_fun = function(args, body, env) > > { > > f = function() > > formals(f) = args > > body(f) = body > > environment(f) = env > > f > > } > > > > 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! > > Hadley > > -- > RStudio / Rice University > http://had.co.nz/ > -- Gabriel Becker Graduate Student Statistics Department University of California, Davis [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel