title: dplyr - using mutate() like rowmeans()
body: <p>I can't find the answer anywhere. </p>
  
  <p>I would like to calculate new variable of data frame which is based on mean of rows.</p>
  
  <p>For example:</p>
  
  <pre><code>data &lt;- data.frame(id=c(101,102,103), a=c(1,2,3), b=c(2,2,2), c=c(3,3,3))
  </code></pre>
  
  <p>I want to use mutate to make variable d which is mean of a,b and c. And I would like to be able to make that by selecting columns in way d=mean(a,b,c), and also I need to use range of variables (like in dplyr) d=mean(a:c).</p>
  
  <p>And of course</p>
  
  <pre><code>mutate(data, c=mean(a,b)) 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>mutate(data, c=rowMeans(a,b)) 
  </code></pre>
  
  <p>doesn't work.</p>
  
  <p>Can you give me some tip?</p>
  
  <p>Regards</p>