title: Getting totals by year
body: <p>I have the following DF.</p>
  
  <pre><code>Fund   Name   Assets_Jan2000 Asset_Feb2000 Asets_Mar2000
   x      Y          20234        654654         13154
   A      T          45646        46546544       
   K      L          464654                      464
  </code></pre>
  
  <p>There are many more columns - All the way through to Dec2017.</p>
  
  <p>I would like to get the totals each month (e.g. Jan 2000) as well as each year (e.g. 2000, 2001 etc). </p>
  
  <p>I tried the following</p>
  
  <pre><code>total &lt;- colSums(assets[, c(3:365)], na.rm = TRUE)
  total1 &lt;- as.data.frame(total). 
  </code></pre>
  
  <p>This gives me the totals by month. I'm not sure how to get to the totals by year?  </p>