title: How to convert list file to matrix
body: <p>I have a list file as below:</p>
  
  <pre><code>&gt; results
  [[1]]
  [[1]][[1]]
  [[1]][[1]][[1]]
  [[1]][[1]][[1]][[1]]
  [1] "1"            "inflammation" "37.5"         "A"            "B"           
  [6] "F"           
  
  [[1]][[1]][[2]]
  [[1]][[1]][[2]][[1]]
  [1] "1"         "Apoptosis" "37.5"      "C"         "G"         "H"        
  
  [[1]][[1]][[3]]
  [[1]][[1]][[3]][[1]]
  [1] "1"      "Repair" "25"     "A"      "H"     
  
  [[2]]
  [[2]][[1]]
  [[2]][[1]][[1]]
  [[2]][[1]][[1]][[1]]
  [1] "2"            "inflammation" "20"           "F"           
  
  [[2]][[1]][[2]]
  [[2]][[1]][[2]][[1]]
  [1] "2"         "Apoptosis" "40"        "G"         "H"        
  
  [[2]][[1]][[3]]
  [[2]][[1]][[3]][[1]]
  [1] "2"      "Repair" "20"     "H"     
  </code></pre>
  
  <p>Also this is the output of dput function:</p>
  
  <pre><code>dput(results)
  list(list(list(list(c("1", "inflammation", "37.5", "A", "B", 
  "F")), list(c("1", "Apoptosis", "37.5", "C", "G", "H")), list(
      c("1", "Repair", "25", "A", "H")))), list(list(list(c("2", 
  "inflammation", "20", "F")), list(c("2", "Apoptosis", "40", "G", 
  "H")), list(c("2", "Repair", "20", "H")))), list(list(list(c("3", 
  "inflammation", "25", "F")), list(c("3", "Apoptosis", "25", "C"
  )), list(c("3", "Repair", "0")))), list(list(list(c("4", "inflammation", 
  "50", "A", "B", "F")), list(c("4", "Apoptosis", "33.3333333333333", 
  "G", "H")), list(c("4", "Repair", "33.3333333333333", "A", "H"
  )))))
  </code></pre>
  
  <p><strong>Then I want to make a matrix like this</strong></p>
  
  <pre>
      Number         pathway              wight     genes
      1                inflammation       37.5      A, B, F           
      1                Apoptosis          37.5      C, G, H
      1                Repair             25         A, H
      2                inflammation       20          F           
      2                Apoptosis          40         G, H
      2                Repair             20          H</pre>
  
  <p><strong>Is there any trick for this? genes columns includes various number of genes.</strong></p>