f='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='kw pkg'>Matrix</span><span class='kw ns'>::</span><span class='fu'>diag</span>(<span class='no'>RM</span>)) - <span class='fl'>1</span>,
  <span class='kw'>HLmax</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='kw pkg'>Matrix</span><span class='kw ns'>::</span><span class='fu'>diag</span>(<span class='no'>RM</span>)) - <span class='fl'>1</span>, <span class='kw'>