title: C5.0 models require a factor outcome
body: <p>I am working with the credit.csv for building a learning tree, the data is available in:</p>
  
  <p><a href="https://github.com/stedy/Machine-Learning-with-R-datasets/blob/master/credit.csv" rel="noreferrer">https://github.com/stedy/Machine-Learning-with-R-datasets/blob/master/credit.csv</a></p>
  
  <p>and I have made the following steps:</p>
  
  <pre><code>credit&lt;-read.csv("credit.csv")
  set.seed(12345)
  credit_rand&lt;-credit[order(runif(1000)),]
  credit_train&lt;-credit_rand[1:900,]
  credit_test&lt;-credit_rand[901:1000,]
  library(C50)
  credit_model&lt;-C5.0(credit_train[-21],credit_train$default)
  </code></pre>
  
  <p>In the guide that I am following it appears that I should get rid of the last column which is the value of default, but I got the following error:</p>
  
  <pre><code>Error en C5.0.default(credit_train[, -21], credit_train$default) : 
    C5.0 models require a factor outcome
  </code></pre>
  
  <p>I have tried changing the last line to:</p>
  
  <pre><code>credit_model&lt;-C5.0(credit_train[,-21],credit_train$default)
  </code></pre>
  
  <p>but with no success at all.</p>
  
  <p>Any help?</p>