From sfalcon at fhcrc.org  Thu Sep 14 21:01:31 2006
From: sfalcon at fhcrc.org (Seth Falcon)
Date: Thu, 14 Sep 2006 12:01:31 -0700
Subject: [Rd] Question about substitute() and function def
Message-ID: <m2d59y8e7o.fsf@ziti.fhcrc.org>

Hi,

Can someone help me understand why

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

gives

  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.

Thanks,

+ seth


Using R 2.4 alpha svn r39255




[Rd] Question about substitute() and function def
Seth Falcon