title: Adding columns to data.frame in R
body: <p>Having 2 vectors like the following:</p>
  
  <pre><code>vec1&lt;-c("x", "y")
  vec2&lt;-c(rep(0, 5))
  </code></pre>
  
  <p>I would like to create a data.frame object where vec1 becomes the 1st of column of data.frame DF and vec2 becomes the row with column names too. Visually talking, it may be like this.</p>
  
  <pre><code> vec1  1   2   3   4   5
   x     0   0   0   0   0
   y     0   0   0   0   0
  </code></pre>
  
  <p>I have tried the following code, but it adds both vectors as columns:</p>
  
  <pre><code> DF&lt;-data.frame(vec1, vec2)
  </code></pre>