title: Converting a Large list of lists with 'data points listed in lists' into a data frame in r
body: <p>I have exhaustively researched on how to convert a complex list to a data frame - but it seems my case is fairly unique:</p>
  
  <p>Problem:
  I have a Large list with lists of several variables, whose observations (data points) are further listed as a list.</p>
  
  <p>Below is the structure of a representative list 1 of the multiple primary lists;</p>
  
  <p><code>:List of 5
   ..$ type : chr "time"
   ..$ data :List of 134
   .. ..$ : int 5624
   .. ..$ : int 5625
   .. ..$ : int 5627
   .. .. [list output truncated]
   :List of 5
   ..$ type : chr "dist"
   ..$ data :List of 134
   .. ..$ : num 22321
   .. ..$ : num 22313
   .. .. [list output truncated]
   :List of 5
   ..$ type : chr "cad"
   ..$ data :List of 134
   .. ..$ : num 0.4
   .. ..$ : num 0.6
   .. .. [list output truncated]</code></p>
  
  <p>This structure is thus replicated for a large number of lists - the objective is to convert this list to a data frame by pulling the "data" portion of all the variables defined by "type" across all the major lists</p>
  
  <p>Note: Other major lists may have more variables ($ type) and higher/lower number of observations with the sublist - i.e. a list of 134 does not apply to the other lists in the Large list.</p>
  
  <p>Thanks in anticipation.
  Further update:</p>
  
  <p>Below is the dput result for clarity:</p>
  
  <p>`</p>
  
  <pre><code>list(structure(list(type = "time", data = list(2881L, 2885L, 
      2892L, 2893L, 2898L, 2899L, 2900L, 2901L, 2904L, 2907L, 2911L, 
      2912L, 2914L, 2918L), series_type = "distance", original_size = 14L, 
      resolution = "high"), .Names = c("type", "data", "series_type", 
  "original_size", "resolution")), structure(list(type = "distance", 
      data = list(22512.4, 22548.3, 22605.5, 22615.1, 22670.3, 
          22692.2, 22705.8, 22719, 22752.3, 22771.7, 22815.6, 22827.9, 
          22851.6, 22892.5), series_type = "distance", original_size = 14L, 
      resolution = "high"), .Names = c("type", "data", "series_type", 
  "original_size", "resolution")), structure(list(type = "grade_smooth", 
      data = list(-1.7, -3.1, -3.7, -3.2, -3, -3, -1.4, -2.5, -3.2, 
          -3.6, -3.7, -3.6, -2.7, -2.5)9.7, 10.3, 10.5, 10), 
      series_type = "distance", original_size = 14L, resolution = "high"), .Names = c("type", 
  "data", "series_type", "original_size", "resolution")), structure(list(
      type = "time", data = list(665L, 668L, 671L, 674L, 677L, 
          680L, 683L, 686L, 689L, 692L, 695L, 698L, 701L, 704L), 
      series_type = "distance", original_size = 14L, resolution = "high"), .Names = c("type", 
  "data", "series_type", "original_size", "resolution")))
  </code></pre>
  
  <p>`
  Further Update:</p>
  
  <p>Upon Implementation of solutions provided I end up with a data frame like this:</p>
  
  <p><a href="https://i.stack.imgur.com/JTVki.png" rel="nofollow noreferrer">Current Structure</a></p>
  
  <p><a href="https://i.stack.imgur.com/DrhfN.png" rel="nofollow noreferrer">Needed Structure</a></p>
  
  <p>df issue:</p>
  
  <p>str(unlisting)</p>
  
  <p><code>List of 11106
   $ :List of 5
    ..$ type         : chr "time"
    ..$ data         : int [1:180] 2426 2429 2432 2435 2438 2441 2445 2448 2451 2454 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 180
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "distance"
    ..$ data         : num [1:180] 8802 8815 8826 8834 8844 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 180
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "grade_smooth"
    ..$ data         : num [1:180] -1 -0.7 -0.6 -0.4 -0.2 -0.1 0 0.2 0.4 0.5 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 180
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "velocity_smooth"
    ..$ data         : num [1:180] 2.7 3.9 3.9 3.2 3.1 3.6 3.6 4.4 4.5 3 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 180
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "time"
    ..$ data         : int [1:74] 2999 3008 3009 3016 3020 3026 3027 3029 3030 3036 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 74
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "distance"
    ..$ data         : num [1:74] 23661 23719 23735 23790 23825 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 74
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "grade_smooth"
    ..$ data         : num [1:74] -1.3 -0.5 -0.5 0.6 0.7 1 1 0.5 1 1.9 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 74
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "velocity_smooth"
    ..$ data         : num [1:74] 5.7 6.2 7.4 8.9 8.2 8.6 8.2 8.3 8.2 9.2 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 74
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "time"
    ..$ data         : int [1:60] 396 403 410 416 418 424 429 437 447 455 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 60
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "distance"
    ..$ data         : num [1:60] 935 964 992 1014 1020 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 60
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "heartrate"
    ..$ data         : int [1:60] 121 117 117 111 108 107 109 112 116 121 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 60
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "grade_smooth"
    ..$ data         : num [1:60] -0.7 -0.5 -0.3 0.1 0.4 0.8 1 0.9 1.4 1.6 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 60
    ..$ resolution   : chr "high"
   $ :List of 5
    ..$ type         : chr "velocity_smooth"
    ..$ data         : num [1:60] 3 4 4.1 3.8 3.4 2.8 3.4 5.2 6.2 6.7 ...
    ..$ series_type  : chr "distance"
    ..$ original_size: int 60
    ..$ resolution   : chr "high" 
    [list output truncated]
  </code></p>