title: Named List To/From Data.Frame
body: <p>I'm looking for a quick way to get back and forth between a list of the following format:</p>
  
  <pre><code>$`a`
    [1] 1 2 3
  $`b`
    [1] 4 5 6
  </code></pre>
  
  <p>to/from a data.frame of the following format:</p>
  
  <pre><code>   name x
   1    a 1
   2    a 2
   3    a 3
   4    b 4
   5    b 5
   6    b 6
  </code></pre>
  
  <p>(Don't really care what the names of the columns are, in this case.)</p>
  
  <p>Here's the data frame used above in R-format:</p>
  
  <pre><code>df &lt;- data.frame(name=c(rep("a",3),rep("b",3)), x=c(1:3,4:6))
  </code></pre>
  
  <p>Again, I'm looking for two separate operations: one to convert the above data.frame to a list, and another to convert it back to a data.frame.</p>