title: Converting a deeply nested list to a dataframe
body: <p>I have a deeply nested list I would like to convert to a data frame.
  Here's what the structure looks like:</p>
  <pre><code>ls &lt;- list('10' = list('123' = list('0.1' = list(Gmax.val = rnorm(1),
                                                   G2.val = rnorm(1),
                                                   Gmax.vec = rnorm(8),
                                                   G2.vec = rnorm(8)),
                                      '0.2' = list(Gmax.val = rnorm(1),
                                                   G2.val = rnorm(1),
                                                   Gmax.vec = rnorm(8),
                                                   G2.vec = rnorm(8))),
                         '456' = list ('0.1' = list(Gmax.val = rnorm(1),
                                                    G2.val = rnorm(1),
                                                    Gmax.vec = rnorm(8),
                                                    G2.vec = rnorm(8)),
                                       '0.2' = list(Gmax.val = rnorm(1),
                                                    G2.val = rnorm(1),
                                                    Gmax.vec = rnorm(8),
                                                    G2.vec = rnorm(8)))),
             '20' = list('123' = list('0.1' = list(Gmax.val = rnorm(1),
                                                   G2.val = rnorm(1),
                                                   Gmax.vec = rnorm(8),
                                                   G2.vec = rnorm(8)),
                                      '0.2' = list(Gmax.val = rnorm(1),
                                                   G2.val = rnorm(1),
                                                   Gmax.vec = rnorm(8),
                                                   G2.vec = rnorm(8))),
                         '456' = list ('0.1' = list(Gmax.val = rnorm(1),
                                                    G2.val = rnorm(1),
                                                    Gmax.vec = rnorm(8),
                                                    G2.vec = rnorm(8)),
                                       '0.2' = list(Gmax.val = rnorm(1),
                                                    G2.val = rnorm(1),
                                                    Gmax.vec = rnorm(8),
                                                    G2.vec = rnorm(8)))))
  
  
  &gt; ls[['10']][['123']][['0.1']]
  $Gmax.val
  [1] -0.1982298
  
  $G2.val
  [1] -0.2761515
  
  $Gmax.vec
  [1] -0.4732736 -0.5714809 -0.1600405 -0.7138532  0.3503852 -0.7367241  0.3024992 -0.4931045
  
  $G2.vec
  [1] -0.2374231 -0.7927135 -0.9554769  0.8733201 -0.4126742  1.8689940  0.1576750 -0.2184344
  </code></pre>
  <p>Each sublist name is a value for a different variable: in this example, maybe:</p>
  <pre><code>ls[[]] = time; 10 or 20
  ls[[]][[]] = seed; 123 or 456
  ls[[]][[]][[]] = treatment; 0.1 or 0.2 
  </code></pre>
  <p>Ideally I'd like to have the names of sublists used as values in their own columns. I'd like the data frame to look like this:</p>
  <pre><code>#  time seed treatment  Gmax.val     G2.val    Gmax.vec     G2.vec
  #1   10  123       0.1 0.1972457 -0.1224265  0.06121407  1.5102516
  #2   10  123       0.1 0.1972457 -0.1224265 -2.53026477 -0.1320042
  #3   10  123       0.1 0.1972457 -0.1224265  0.06648820 -0.2477285
  #4   10  123       0.1 0.1972457 -0.1224265 -0.45594701 -0.8577670
  #5   10  123       0.1 0.1972457 -0.1224265  0.90828911 -1.0710828
  #6   10  123       0.1 0.1972457 -0.1224265  0.56427976  1.5086222
  </code></pre>
  <p>Thanks for the help.</p>