7021</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [6,] -521.5195  -732.0659 -1695.942 -1966.0607</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Apply on data.frame per column</span></span></span>
<span class="r-in"><span><span class="va">dfmat</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/as.data.frame.html" class="external-link">as.data.frame</a></span><span class="op">(</span><span class="va">mat</span><sp