lass="kw">ncol</span>(x))
<span class="cf">for</span> (m <span class="cf">in</span> <span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(x)){
    <span class="cf">for</span> (n <span class="cf">in</span> <span class="dv">1</span><span class="op">:</span><span class="kw">ncol</span>(x)){
      a &lt;-<span class="kw">as.numeric</span>(<span class="kw">unlist</span>(<span class="kw">strsplit</span>(x[m,n], <span class="st">"|"</span>))[<span class="dv">1</span>]) 
      
      b &lt;