title: Set colnames in data frame based upon vector of names in R
body: <p>I have a data frame <code>output</code> with dim() characteristics of 563 (y) variables and 2947 observations (x). Columns 1 - 2 are subject #s and test labels whereas 3-563 are the names of the variable observations.</p>
  
  <p>I have a separate data frame <code>df-vars</code> containing 561 variable names. How can I set the column names of my original data frame <code>output</code> to the 561 variable names if <code>df-vars</code>?</p>
  
  <p><code>df-vars</code> looks like this:</p>
  
  <pre><code>    V1  V2
  1   1   tBodyAcc-mean()-X
  2   2   tBodyAcc-mean()-Y
  3   3   tBodyAcc-mean()-Z
  4   4   tBodyAcc-std()-X
  5   5   tBodyAcc-std()-Y
  6   6   tBodyAcc-std()-Z
  7   7   tBodyAcc-mad()-X
  </code></pre>