pan class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span><span class="va">d</span>, Class <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">as.factor</a></span><span class="op">(</span><span class="va">raw</span><span class="op">$</span><span class="va">Class</span><span class="op">[</span><span class="va">idx</span><span class="op">]</span><spa