title: Convert complex list of lists to list of data frames
body: <p>I have a complex list that consists of other lists and data frames. I need to simplify this list to consist only from data frames - so each second level list should be made into separate first level data frames.</p>
  
  <p>Here is reproducible example: </p>
  
  <pre><code> dd&lt;-data.frame(x=1:3,y=4:6)
   l1&lt;-list(dd,list(dd,dd))
   #original list
   l1
  [[1]]
    x y
  1 1 4
  2 2 5
  3 3 6
  
  [[2]]
  [[2]][[1]]
    x y
  1 1 4
  2 2 5
  3 3 6
  
  [[2]][[2]]
    x y
  1 1 4
  2 2 5
  3 3 6
  </code></pre>
  
  <p>Result I need to get</p>
  
  <pre><code> l2&lt;-list(dd,dd,dd)
   l2
  [[1]]
    x y
  1 1 4
  2 2 5
  3 3 6
  
  [[2]]
    x y
  1 1 4
  2 2 5
  3 3 6
  
  [[3]]
    x y
  1 1 4
  2 2 5
  3 3 6
  </code></pre>
  
  <p>I tried with the function <code>unlist()</code> and argument <code>recursive=FALSE</code> but in this case first level data frame is converted to two vectors.</p>
  
  <pre><code> unlist(l1,recursive=FALSE)
  $x
  [1] 1 2 3
  
  $y
  [1] 4 5 6
  
  [[3]]
    x y
  1 1 4
  2 2 5
  3 3 6
  
  [[4]]
    x y
  1 1 4
  2 2 5
  3 3 6
  </code></pre>