title: Finding out if a function is inside another function R
body: <p>I have a main function e.g. "a" that is called inside 4 different functions, e.g. "a1", "a2", "a3", "a4". 
  I want to have an if statement checking when function "a" is called inside either  "a1", "a2", "a3", "a4". </p>
  
  <pre><code>funct1 &lt;- function(a){
    if(functionNameThatItIsInside == "a2"){
       var1 &lt;- 24243
     }
  
  if(functionNameThatItIsInside == "a1"){
       var1 &lt;- 22525
     }
  
  if(functionNameThatItIsInside == "a1"){
       var1 &lt;- 2525
     }
  
  if(functionNameThatItIsInside == "a1"){
       var1 &lt;- 636364
     }
  }
  
  
  </code></pre>
  
  <p>or something like this.</p>
  
  <p>Thanks </p>