title: Convert a dataframe to a vector (by rows)
body: <p>I have a dataframe with numeric entries like this one</p>
  
  <pre><code>test &lt;- data.frame(x = c(26, 21, 20), y = c(34, 29, 28))
  </code></pre>
  
  <p>How can I get the following vector?</p>
  
  <pre><code>&gt; 26, 34, 21, 29, 20, 28
  </code></pre>
  
  <p>I was able to get it using the following, but I guess there should be a much more elegant way</p>
  
  <pre><code>X &lt;- test[1, ]
  for (i in 2:dim(test)[ 1 ]){
     X &lt;- cbind(X, test[i, ])
     } 
  </code></pre>