title: How to aggregate duplicate rows with multiple columns in data frame
body: <p>I have a <code>data.frame</code> that looks like this (however with a larger number of columns and rows):</p>
  
  <pre><code>    Gene      Cell1    Cell2    Cell3     
  1      A          2        7        8 
  2      A          5        2        9 
  3      B          2        7        8
  4      C          1        4        3
  </code></pre>
  
  <p>I want to sum the rows that have the same value in <code>Gene</code>, in order to get something like this:</p>
  
  <pre><code>    Gene      Cell1    Cell2    Cell3     
  1      A          7        9       17  
  2      B          2        7        8
  3      C          1        4        3
  </code></pre>
  
  <p>Based on the answers to previous questions, I've tried to use <code>aggregate</code> but I could not understand how I can get the above result. This is what I've tried:</p>
  
  <pre><code>aggregate(df[,-1], list(df[,1]), FUN = sum)
  </code></pre>
  
  <p>Does anyone have an idea of what I'm doing wrong?</p>