title: When/how/where is parent.frame in a default argument interpreted?
body: <p>Truth be told, I'm just being lazy here, but perhaps someone could someday profit from the answer being here.</p>
  
  <p>Say I define a function like:</p>
  
  <pre><code>fn&lt;-function(envir=parent.frame())
  {
      #do something with envir
  }
  </code></pre>
  
  <p>My question is: what might I expect to be the content of envir?</p>
  
  <p>Context: I had a rather long function f1 that contained a call to parent.frame. Now, I want to extract part of that function (containing the parent.frame call) into a new helper function f2 (which will then be called by f1), and I want to be sure that f1 does the same as it did before.</p>