title: Convert hourly data to daily maximum, minimum, mean
body: <p>I have hourly weather data of one year. I like to extract daily max, mean etc from it. so I was looking for help here. I came across following topic:</p>
  
  <p><a href="https://stackoverflow.com/questions/11556662/convert-hourly-rainfall-data-into-daily-in-specific-time-interval/11557094#11557094">convert hourly rainfall data into daily in specific time interval</a></p>
  
  <p>I could not able to understand the answer by Pop. As I have less than 50 points, I could not able to add comments there. So I am posting this question.
  Can anyone explain these commands?</p>
  
  <pre><code>fun &lt;- function(s,i,j) { sum(s[i:(i+j-1)]) }
  sapply(X=seq(1,24*nb_of_days,24),FUN=fun,s=your_time_serie,j=24)
  </code></pre>