title: Calculate sum by grouping by column value in R
body: <p>I have a data frame with two columns, a <code>Ref_Date</code> column and a <code>Value</code> column. The date column contains 12 rows for each year, from 1988 until 2015. What I need to do is to group by the year only and summarize the <code>Value</code> column so that I can get only one row for each year containing the sum of all values for each of the 12 months of that year:</p>
  
  <pre><code>row.names   Ref_Date    Value
  166483      1989/01     713
  166484      1989/02     771
  166485      1989/03     565
  166486      1989/04     1248
  166487      1989/05     1380
  166488      1989/06     1118
  166489      1989/07     1026
  166490      1989/08     995
  166491      1989/09     835
  166492      1989/10     939
  166493      1989/11     878
  166494      1989/12     1075
  166495      1990/01     878
  166496      1990/02     563
  166497      1990/03     773
  166498      1990/04     1131
  166499      1990/05     1562
  166500      1990/06     1747
  166501      1990/07     1258
  166502      1990/08     791
  </code></pre>