="sourceCode r"><span id="cb40-1"><a></a>units<span class="sc">::</span><span class="fu">set_units</span>(a, km<span class="sc">^</span><span class="dv">2</span>) <span class="co"># result in square kilometers</span></span>
<span id="cb40-2"><a></a><span class="co">#&gt; 3062.85 [km^2]</span></span>
<span id="cb40-3"><a></a>units<span class="sc">::</span><span class="fu">set_units</span>(a, ha) <span class="co"># result in hectares</span></span>
<span id="cb40-4"><a></a><span class="co">#&gt; 306285 [ha]</s