[Rd] Question about substitute() and function def

Seth Falcon sfalcon at fhcrc.org
Thu Sep 14 21:01:31 CEST 2006


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

More information about the R-devel mailing list