title: Grouping and Totaling Data in R Based on Two Groups
body: <p>Good Evening,</p>
  
  <p>I have data that look like this</p>
  
  <pre><code>FY     Type     Total
  2014   State    $5,000
  2014   Federal  $2,596
  2014   State    $5,123
  2014   Federal  $2,567
  2013   State    $5,555
  2013   Federal  $2,784
  2013   State    $5,562
  2013   Federal  $2,556
  </code></pre>
  
  <p>How would I be able to get Totals by both FY and Type in R?</p>
  
  <p>So that it can look like:</p>
  
  <pre><code>FY      Type    Total
  2013    Federal $5,340
  2013    State   $11,117
  2014    Federal $5,163
  2014    State   $10,123
  </code></pre>