title: How to calculate average values large datasets
body: <p>I am working with a dataset that has temperature readings once an hour, 24 hrs a day for 100+ years. I want to get an average temperature for each day to reduce the size of my dataset. The headings look like this:</p>
  
  <pre><code>     YR MO DA HR MN TEMP
    1943  6 19 10  0   73
    1943  6 19 11  0   72
    1943  6 19 12  0   76
    1943  6 19 13  0   78
    1943  6 19 14  0   81
    1943  6 19 15  0   85
    1943  6 19 16  0   85
    1943  6 19 17  0   86
    1943  6 19 18  0   86
    1943  6 19 19  0   87
  </code></pre>
  
  <p>etc for 600,000+ data points.</p>
  
  <p>How can I run a nested function to calculate daily average temperature so i preserve the YR, MO, DA, TEMP? 
  Once I have this, I want to be able to look at long term averages &amp; calculate say the average temperature for the Month of January across 30 years. How do I do this?</p>