[Rd] Question about substitute() and function def

From: Seth Falcon <sfalcon_at_fhcrc.org>
Date: Thu 14 Sep 2006 - 19:01:31 GMT


Can someone help me understand why

  substitute(function(a) a + 1, list(a=quote(foo)))


  function(a) foo + 1

and not

  function(foo) foo + 1

The man page leads me to believe this is related to lazy evaluation of function arguments, but I'm not getting the big picture.


+ seth

Using R 2.4 alpha svn r39255

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Sep 15 05:03:49 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 14 Sep 2006 - 20:16:58 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.