title: Split a data.frame by columns and storing each column as an object with the column names as name of the object
body: <p>HI this is a fundamental question that I have with R. I know there might be solutions out there to do my task, but I would like to ask why could my function wont work. </p>
  
  <p>I have a data.frame that looks like this </p>
  
  <pre><code>A B C
  1 2 3
  2 3 4
  </code></pre>
  
  <p>and I want to store each of values in <code>A</code>, <code>B</code> or <code>C</code> into individual objects with names <code>A</code>, <code>B</code> and <code>C</code>.</p>
  
  <p>So here my function</p>
  
  <pre><code>splitcolnames&lt;-function(x)
    {for (i in colnames(x)){
      subset(x, select=c(i))-&gt;i}}
  }
  </code></pre>
  
  <p>But it doesn't work. Can someone be kind and point out what did I not get right?</p>