Skip to content
Prev 33959 / 63424 Next

Finding the environment of a promise

On Sep 9, 2009, at 9:40 , Henrique Dallazuanna wrote:

            
^-- this will always return R_GlobalEnv (see ?sys.frame - which = 0 by  
default) regardless of the function and promise.

Also the question was about the environment of the promise, not the  
function. Technically a promise can be evaluated anywhere since it  
ignores the evaluation environment and will use its creation  
environment which is what Hadley was trying to get at (and as Duncan  
was saying it's not something that is or should be available at R  
level as it's an internal implementation detail).

Cheers,
Simon