title: naive_bayes.default error in argument y in r
body: <p>naive_bayes.default gives error with y as :</p>
  
  <p>"y has to be either a factor or character or logical vector"
  here y are names in the dataset. </p>
  
  <pre><code>results &lt;- naive_bayes(data1[,14], data1[,1], prior=data1[,16]) 
  </code></pre>
  
  <p>default: naive_bayes(x,y,prior)</p>
  
  <p>where data[,14] are marks, data[,1] are names,data[,16] are category in my dataset.</p>
  
  <p>Pls clarify the problem. 
  Thanks in advance!</p>