title: R assigning values from a data frame to colnames
body: <p>I have a data frame (called HumMeth450) with data from several samples. The first five rows contain details about the sample, and the followings rows contain the data itself, for example:</p>
  
  <pre><code>3B26-1          3A25-1-1        
  P16 -           P16 -       
  3B-26-clone1    3A-25-1-1-100-1     
  Beta Value      Beta Value      
  Uncorrected     Uncorrected 
  0.765508685     0.598394686 
  0.814338487     0   
  </code></pre>
  
  <p>I want to set colnames to contain the first five rows from each column.</p>
  
  <p>I tried using </p>
  
  <pre><code>colnames(HumMeth450)&lt;-as.character(HumMeth450[(1:5),])
  </code></pre>
  
  <p>and got something that did not match the value of the respective cells, for the two columns cited above I got:</p>
  
  <p>c(469032, 469023, 469031, 469033, 323649), c(467282, 467273, 467281, 467283, 271454)    </p>
  
  <p>What am I doing wrong?
  any help will be apprciated.</p>