title: Creating a loop for transposing rows to a single column in R
body: <p>I'm trying to transform a data set with 6 columns into a new data set with a single column. I was trying to implement a loop where R reads each row and pastes it as a column, the next row is pasted below the first column and so on, until I have a single final column.
  Here's an example of what I intend to do:</p>
  
  <pre><code>row1 &lt;- xlsx_in[1,]
  </code></pre>
  
  <blockquote>
    <p>C1        C2        C3        C4        C5       C6
                                  
    1 0.0293109 0.0303286 0.0321606 0.0327712 0.0333818 0.034196</p>
  </blockquote>
  
  <pre><code>col1 &lt;- as.data.frame(t(row1))
  </code></pre>
  
  <blockquote>
    <p>V1
    C1 0.0293109
    C2 0.0303286
    C3 0.0321606
    C4 0.0327712
    C5 0.0333818
    C6 0.0341960</p>
  </blockquote>
  
  <p>I did it for a single row. What I don't know, from this point, is how to do it in a loop and paste the subsequent row as new values of this column. </p>
  
  <p>Thank you for your help!</p>