ard usecase is that you have a number of regions (say <code>IRanges</code>) and you want to do something to your <code>Rle</code> over each of these regions. Enter <code>aggregate()</code>.</p>
<pre class="r"><code>ir &lt;- IRanges(start = c(2,6), width = 2)
aggregate(rl, ir, FUN = mean)</code></pre>
<pre><code>## [1] 1.0 2.5</code></pre>
<p>It is also possible to covert an <code>IRanges</code> to a <code>Rle</code> by the <code>coverage()</code> function. This counts, for each integer, how many ranges over