title: R list into a single data frame cell
body: <p>I'd like to change a list into one cell of a data frame. </p>
  
  <pre><code>  list &lt;- list(1,2,3,4,5)
  
  View(list)
  
  [[1]]
  [1] 1
  
  [[2]]
  [1] 2
  
  [[3]]
  [1] 3
  
  [[4]]
  [1] 4
  
  [[5]]
  [1] 5
  </code></pre>
  
  <p>I'd like to transform this such that it looks like:</p>
  
  <pre><code>          x
  1 1,2,3,4,5
  </code></pre>
  
  <p>The reason is because I have a loop that is storing result in a list for each iteration, but I only want one cell per iteration. </p>
  
  <p>There are other columns where for each iteration, there is only one result. So saving that in a data frame is easy. But then for the metric with multiple results, I don't want multiple columns or rows.</p>
  
  <p>So I will have two data frames that I can use <code>cbind</code> on such that my final data frame will look like:</p>
  
  <pre><code>          x y
  1 1,2,3,4,5 a
  2     5,4,3 b
  </code></pre>