title: Accessing variables in a function within a function
body: <p>When running a function in R, I run another function within it. 
  I have a code on the lines of this:</p>
  
  <pre><code>f_a &lt;- function(b, c){
      return(b + c)
  }
  
  f_e &lt;- function(){
      b = 2
      c = 2 
      d = f_a(b, c)
      print(d)
  }
  </code></pre>
  
  <p>This works fine. What I'd like to do is <strong>not pass the variables</strong> <code>b, c</code> to the function <code>f_a</code>. I'd like to do something like this (which throws errors)</p>
  
  <pre><code>f_a &lt;- function(){
      return(b + c)
  }
  
  f_e &lt;- function(){
      b = 2
      c = 2
      d = f_a()
      print(d)
  }
  </code></pre>
  
  <p>Is there a way to do this using environments or search paths or any other way?</p>