title: Splitting a dataframe into smaller chunks
body: <p>Let's say I have the following <code>data.frame</code></p>
  
  <pre><code>&gt; df &lt;- data.frame(a=rep(1:3),b=rep(1:3),c=rep(4:6),d=rep(4:6))
  &gt; df
    a b c d
  1 1 1 4 4
  2 2 2 5 5
  3 3 3 6 6
  </code></pre>
  
  <p>I would like to be able to split this <code>df</code> into two frames <code>df1</code> and <code>df2</code>. I want <code>df1</code> to be the first two columns of <code>df</code> and for <code>df2</code> to be the second two columns of <code>df</code>. Is there a way to do this in code so that I do not have to do the following manually:</p>
  
  <pre><code>&gt; df1 &lt;- df[,1:2]
  &gt; df1
    a b
  1 1 1
  2 2 2
  3 3 3
  &gt; df2 &lt;- df[,3:4]
  &gt; df2
    c d
  1 4 4
  2 5 5
  3 6 6
  </code></pre>
  
  <p>It would be nice because the problem I'm dealing with has a variable number of columns and I just want to be able to create <code>n = ncol(df)/2</code> data frames. So if there were 2 more columns in the example above, <code>df3</code> would be <code>df[,5:6]</code>.</p>
  
  <p>Thank you!</p>