title: Convert data.frame to list of lists
body: <p>I am trying to figure out how to convert a data.frame to a list of lists. Suppose I had (feel free to modify this if you need to capture more attributes for later):</p>
  
  <pre><code>v &lt;- list(
            row1=list(col1 = as.Date("2011-01-23"), col2="A"), 
            row2=list(col1 = as.Date("2012-03-03"), col2="B"))
  d &lt;- do.call(rbind, lapply(v, as.data.frame))
  d$col3 &lt;- 2
  </code></pre>
  
  <p>How do I get <code>d</code> back to a list of lists (similar to <code>v</code>). The end result should be equivalent to the result of:</p>
  
  <pre><code>vr &lt;- list(
            row1=list(col1 = as.Date("2011-01-23"), col2="A", col3=2), 
            row2=list(col1 = as.Date("2012-03-03"), col2="B", col3=2))
  </code></pre>