title: Calculate row means on subset of columns
body: <p>Given a sample data frame:</p>
  
  <pre><code>C1&lt;-c(3,2,4,4,5)
  C2&lt;-c(3,7,3,4,5)
  C3&lt;-c(5,4,3,6,3)
  DF&lt;-data.frame(ID=c("A","B","C","D","E"),C1=C1,C2=C2,C3=C3)
  
  DF
      ID C1 C2 C3
    1  A  3  3  5
    2  B  2  7  4
    3  C  4  3  3
    4  D  4  4  6
    5  E  5  5  3
  </code></pre>
  
  <p>What is the best way to create a second data frame that would contain the <code>ID</code> column and the mean of each row? Something like this:</p>
  
  <pre><code>ID  Mean
  A    3.66
  B    4.33
  C    3.33
  D    4.66
  E    4.33
  </code></pre>
  
  <p>Something similar to: </p>
  
  <pre><code>RM&lt;-rowMeans(DF[,2:4])
  </code></pre>
  
  <p>I'd like to keep the means aligned with their <code>ID</code>'s. </p>