title: Select first row from multiple dataframe and bind
body: <p>I have three data frames which I have combined in a list </p>
  
  <pre><code>d1 &lt;- data.frame(y1 = c(1, 2, 3), y2 = c(4, 5, 6))
  d2 &lt;- data.frame(y1 = c(3, 2, 1), y2 = c(6, 5, 4))
  d3 &lt;- data.frame(y1 = c(5, 7, 8),y2 = c(6, 4, 2))
  my.list &lt;- list(d1, d2,d3)
  </code></pre>
  
  <p>I want to extract the first row of each element in the list, bind them row wise and save as csv file.</p>
  
  <p>For example, in above example, I want to extract first row from <code>d1</code>, <code>d2</code> and <code>d3</code> </p>
  
  <pre><code>row1.d1 &lt;- c(1,4)
  row1.d2 &lt;- c(3,6)
  row1.d3 &lt;- c(5,6)
  </code></pre>
  
  <p>and bind them together</p>
  
  <pre><code>dat &lt;- rbind(row1.d1,row1.d2,row1.d3)
  dat     
  
  row1.d1    1    4
  row1.d2    3    6
  row1.d3    5    6
  </code></pre>
  
  <p>and repeat it for all rows.</p>
  
  <p>I found a way to do this if I have a list of vectors, </p>
  
  <pre><code> A=list()
   A[[1]]=c(1,2)
   A[[2]]=c(3,4)
   A[[3]]=c(5,6)
  
   sapply(A,'[[',1)
  </code></pre>
  
  <p>But for dataframes, I am not sure how to go about it.   </p>