title: function argument definition issue in R
body: <p>Here is my problem, when I want to develop a function for widespread use. </p>
  
  <pre><code>dataframe1 &lt;- data.frame(V1 = 1:10, V2 = 11:20, V3 = 21:30, V4 = 31:40)
  myfun &lt;- function (dataframe, A, B, yvar) {
                    dataframe1$A &lt;- as.factor(dataframe$A)
                    dataframe1$B &lt;- as.factor (dataframe$B)
                    dataframe1 &lt;- data.frame(A = dataframe1$A, 
                    B = dataframe1$B, yvar = dataframe1$yvar)
                    print(dataframe1)
                    }
  
   myfun (dataframe = dataframe1, A = "V1", B= "V2", yvar = "V3")
   Error in `$&lt;-.data.frame`(`*tmp*`, "A", value = integer(0)) :
    replacement has 0 rows, data has 10
  
  myfun (dataframe = dataframe1, A = dataframe1$V1, 
           B= dataframe1$V2, yvar = dataframe1$V3)
  Error in `$&lt;-.data.frame`(`*tmp*`, "A", value = integer(0)) :
    replacement has 0 rows, data has 10
  </code></pre>
  
  <p>I would like to define using the first type of definition, where variable name argument are in "parenthesis" instead of "datafile$variablename" </p>