r-in"><span><span class="co"># This example includes pivoting and nesting. The CMS patient care data</span></span></span>
<span class="r-in"><span><span class="co"># has multiple tests per institution in a long format, and observed /</span></span></span>
<span class="r-in"><span><span class="co"># denominator types. Firstly we pivot the data to allow us to easily calculate</span></span></span>
<span class="r-in"><span><span class="co"># a total percentage for each institution. This is duplicated for every t