title: How to convert list of list into tidy tibble or data.frame in R
body: <p>I have the following list of list:</p>
  
  <pre><code>my_lol &lt;- structure(list(coolfactor_score = list(structure(c(0.164477631065473, 
  0.198253819406019, 0.396414447052519, 0.133118603987442, 0.107735498488546
  ), .Names = c("B", "Mac", "NK", "Neu", "Stro")), structure(c(0.186215537135912, 
  0.18408529174803, 0.375349920115798, 0.247664923324821, 0.006684327675438
  ), .Names = c("B", "Mac", "NK", "Neu", "Stro"))), sr_crt = list(
      structure(list(crt = 0.133118603987442, sr = 0.407076876403305), .Names = c("crt", 
      "sr")), structure(list(crt = 0.18408529174803, sr = 0.0829181742326453), .Names = c("crt", 
      "sr"))), sample_names = c("Sample1", "Sample2")), .Names = c("coolfactor_score", 
  "sr_crt", "sample_names"))
  </code></pre>
  
  <p>Which looks like this:</p>
  
  <pre><code>&gt; my_lol
  $coolfactor_score
  $coolfactor_score[[1]]
          B       Mac        NK       Neu      Stro 
  0.1644776 0.1982538 0.3964144 0.1331186 0.1077355 
  
  $coolfactor_score[[2]]
            B         Mac          NK         Neu        Stro 
  0.186215537 0.184085292 0.375349920 0.247664923 0.006684328 
  
  
  $sr_crt
  $sr_crt[[1]]
  $sr_crt[[1]]$crt
  [1] 0.1331186
  
  $sr_crt[[1]]$sr
  [1] 0.4070769
  
  
  $sr_crt[[2]]
  $sr_crt[[2]]$crt
  [1] 0.1840853
  
  $sr_crt[[2]]$sr
  [1] 0.08291817
  
  
  
  $sample_names
  [1] "Sample1" "Sample2"
  # Note that the number of samples can be more than 2 and cell type more than 5.
  </code></pre>
  
  <p>How can I tidy it into this data frame (tibbles)</p>
  
  <pre><code>CellType    Sample    CoolFactorScore  SR            CRT
  B           Sample1   0.1644776        0.4070769     0.1331186
  Mac         Sample1   0.1982538        0.4070769     0.1331186
  NK          Sample1   0.3964144        0.4070769     0.1331186
  Neu         Sample1   0.1331186        0.4070769     0.1331186
  Stro        Sample1   0.1077355        0.4070769     0.1331186
  B           Sample2   0.186215537      0.08291817    0.1840853
  Mac         Sample2   0.184085292      0.08291817    0.1840853
  NK          Sample2   0.375349920      0.08291817    0.1840853
  Neu         Sample2   0.247664923      0.08291817    0.1840853
  Stro        Sample2   0.006684328      0.08291817    0.1840853
  </code></pre>