title: Use function argument as name for new data frame in R
body: <p>this is very simple, but I have searched and failed to find a solution for this small problem.</p>
  
  <p>I want to use the argument of a function as the name for a new data frame, for example:</p>
  
  <pre><code>assign.dataset&lt;-function(dataname){
      x&lt;-c(1,2,3)
      y&lt;-c(3,4,5)
      dataname&lt;&lt;-rbind(x,y)
  }
  </code></pre>
  
  <p>Then </p>
  
  <pre><code>assign.dataset(new.dataframe.name)
  </code></pre>
  
  <p>just creates a new dataset with the name <em>dataname</em>.</p>
  
  <p>I have tried to use the <em>paste</em> and <em>assign</em> functions but with no success.</p>
  
  <p>Many thanks</p>