title: Eight-hour averages in R studio
body: <p>I want to get eight-hour (Time column) averages of the maximum values of O column. It is important that the time column is each hour of one day. Also, the dataset contains the next columns: (place) several place, (date) 365 days, (Time) per each day it has 24 hours,  (O) values of ozone, month and year.</p>
  <p>The sample dataset is:</p>
  <pre><code>data%&gt;%select(&quot;Place&quot;,&quot;date&quot;,&quot;Time&quot;, &quot;O&quot;,
                             &quot;month&quot;,&quot;year&quot;)
  
  Place        Date     Time   O  month    year
  Al          2016-01-01  1   23  enero   2016
  Al          2016-01-01  2   15  enero   2016
  Al          2016-01-01  3   18  enero   2016
  Al          2016-01-01  4   18  enero   2016
  Al          2016-01-01  5   20  enero   2016
  Al          2016-01-01  6   21  enero   2016
  Al          2016-01-01  7   24  enero   2016
  Al          2016-01-01  8   24  enero   2016
  Al          2016-01-01  9   22  enero   2016
  Al          2016-01-01  10  24  enero   2016
  Al          2016-01-01  11  33  enero   2016
  Al          2016-01-01  12  53  enero   2016
  Al          2016-01-01  13  54  enero   2016
  Al          2016-01-01  14  54  enero   2016
  Al          2016-01-01  15  58  enero   2016
  Al          2016-01-01  16  60  enero   2016
  Al          2016-01-01  17  57  enero   2016
  Al          2016-01-01  18  55  enero   2016
  Al          2016-01-01  19  50  enero   2016
  Al          2016-01-01  20  51  enero   2016
  Al          2016-01-01  21  51  enero   2016
  Al          2016-01-01  22  55  enero   2016
  Al          2016-01-01  23  46  enero   2016
  Al          2016-01-01  24  57  enero   2016
  
  </code></pre>
  <p>I hope to get the maximum values of O column by the period of one day, ie, the 2016-01-01 I want to get eight maximum value of O and make the average.
  But I don't know how to do.</p>