title: How to write each element in a list to different row in R?
body: <p>I have a list, like this:</p>
  
  <pre><code>x &lt;- 2
  y &lt;- "sdsd"
  z &lt;- 2323322
  a_list &lt;- list("x" = x, "y" = y, "z" = z)
  
  &gt; a_list
  $x
  [1] 2
  
  $y
  [1] "sdsd"
  
  $z
  [1] 2323322
  </code></pre>
  
  <p>I want to write this list to a csv file, one row for each element. I tried <code>write.csv(a_list, file = "abc.csv")</code> and got this </p>
  
  <pre><code>    x   y       z
  1   2   sdsd    2323322
  </code></pre>
  
  <p>If transpose the result, it would be what I want:</p>
  
  <pre><code>x, 2
  y, sdsd
  z, 2323322
  </code></pre>