title: R get the environment created by a function at the call
body: <p>I would like to get the environment created by a function when it is runned <strong>WITHOUT</strong> modifying the function source (ie from outside of the function), is it possible ?</p>
  
  <pre><code>fn=function()
  {#Here a new environment is created at each call, how to get it ?
   #This environment can be access with environment() but only (to what I know) 
   #from inside the function
  
    ...
  }
  </code></pre>
  
  <p>I would like something like this: </p>
  
  <pre><code>env=some_function(fn())
  </code></pre>
  
  <p>where env is the environment id created by fn at the call.</p>