title: R - Turn List Into DataFrame
body: <p>There is a list like this, starting from 1.</p>
  
  <pre><code>[[7158]]
  [1] 81 72
  
  [[7159]]
  [1] 81 69
  
  [[7160]]
  [1] 81 79
  
  [[7161]]
  [1] 81 84
  </code></pre>
  
  <p>This needs to be changed to a data frame where the first number in each element is aligned in one data frame column, and the second number in each element is placed in the second column of a data frame.  So it should end up like this</p>
  
  <pre><code>&gt; data.frame("col1" = c(81, 81, 81, 81), "col2" = c(72, 69, 79, 84))
    col1 col2
  1   81   72
  2   81   69
  3   81   79
  4   81   84
  </code></pre>
  
  <p>I tried doing <code>do.call(rbind.data.frame, my_list)</code> but it seems to place the numbers in a huge number of columns, not coerce it down to the two columns needed.  It would be pretty straight forward to do this with a loop but what is the R way to do it? Thanks.</p>