title: R function returns "Object not found" but variable does exist
body: <p>This basic code should say everything:</p>
  <pre><code>
  df = data.frame(var1 = c(&quot;A&quot;,&quot;B&quot;,&quot;C&quot;), var2 = c(1,2,3))
  df
  # var1 var2
  # 1    A    1
  # 2    B    2
  # 3    C    3
  
  
  newfunc = function(data = df, IV, DV){
    IV
    DV
  }
  
  newfunc(data = df, IV = var1, DV = var2)
  # Error in print(IV) : object 'var1' not found
  </code></pre>
  <p>I must be overlooking something obvious - what is missing here?</p>