title: Split data.frame based on levels of a factor into new data.frames
body: <p>I'm trying to create separate <code>data.frame</code> objects based on levels of a factor. So if I have:</p>
  
  <pre><code>df &lt;- data.frame(
    x=rnorm(25),
    y=rnorm(25),
    g=rep(factor(LETTERS[1:5]), 5)
  )
  </code></pre>
  
  <p>How can I split <code>df</code> into separate <code>data.frame</code>s for each level of <code>g</code> containing the corresponding <code>x</code> and <code>y</code> values?  I can get most of the way there using <code>split(df, df$g)</code>, but I'd like the each level of the factor to have its own <code>data.frame</code>. </p>
  
  <p>What's the best way to do this?</p>