title: Max value in intervals in dataframe in R
body: <p>I have data with date time, height in power(10MB).
  Example:</p>
  <pre><code>date&lt;-c(&quot;9-1-2020&quot;,&quot;10-1-2020&quot;,&quot;11-12-2020&quot;,&quot;12-1-2020&quot;)
  height&lt;-c(32.2,32.3,48,35.2)
  power&lt;-(9,10,14,15)
  data&lt;-cbind(date, height, power)
  </code></pre>
  <p>I would like have intervals for height between 32 in 48 with step 0.3.
  For each interval I would like calculate maximum value for power.</p>
  <p>I have interval for height  example [30.2,30.4]. The maximum power for that interval is 10. In new data frame I would like save 30.3 for column height  and 10 for column power.</p>