title: Assign names to data frame with as.data.frame function
body: <p>I am trying to convert a matrix into data frame, and assign the names in one line. </p>
  
  <p>As I used <code>?as.data.frame</code> there is a parameter called <code>col.names</code> which doesn't seem to work for me, am I doing something wrong?</p>
  
  <pre><code>as.data.frame(matrix(c(1:4), nrow=2), col.names=c("a","b"))
  </code></pre>
  
  <p>Output:   </p>
  
  <pre><code>   V1 V2  
  1  1  3  
  2  2  4  
  </code></pre>
  
  <p>Expected Output:   </p>
  
  <pre><code>   a  b  
  1  1  3  
  2  2  4  
  </code></pre>
  
  <p>I know I can assign it later with `colnames(matrix) = c("a,"b), but i am just wondering if it is possible to do it in one line. (</p>