title: Why is the output of predict a factor with 0 levels?
body: <p>
  I generated a naive Bayes classifier using <code>e1071</code> and then ran the following</p>
  
  <pre class="lang-r prettyprint-override"><code>test &lt;- as.data.frame(readRDS('ContactsComplaints2014.rds'))
  load(file='data2015.nb.RData')
  prediction &lt;- predict(data2015.nb,subset(test[1:3000,], select=-c(didComplain)))
  </code></pre>
  
  <p>In the terminal I entered</p>
  
  <p><code>&gt; prediction</code></p>
  
  <p>and got</p>
  
  <pre class="lang-r prettyprint-override"><code>factor(0)
  Levels:
  </code></pre>
  
  <p>Why?</p>