ot;3&quot;,&quot;4&quot;,..: 1 1 1 1 1 1 1 1 5 1 ...</span></span>
<span id="cb3-41"><a href="#cb3-41"></a><span class="co">#&gt;  $ Class          : Factor w/ 2 levels &quot;benign&quot;,&quot;malignant&quot;: 1 1 1 1 1 2 1 1 1 1 ...</span></span></code></pre></div>
<p>This takes care of the class encoding but now we need to code the factors to numeric</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1"></a><span class="cf">for</span>(