Re: [R] weird predict function error when I use naive bayes

2012-05-05 Thread Uwe Ligges
On 04.05.2012 13:54, kiinalist wrote: Hi, I tried to use naivebayes in package 'e1071'. when I use following parameter, only one predictor, there is an error. m- naiveBayes(iris[,1], iris[,5]) table(predict(m, iris[,1]), iris[,5]) Error in log(sapply(attribs, function(v) { : Non-numeric

[R] weird predict function error when I use naive bayes

2012-05-04 Thread kiinalist
Hi, I tried to use naivebayes in package 'e1071'. when I use following parameter, only one predictor, there is an error. m- naiveBayes(iris[,1], iris[,5]) table(predict(m, iris[,1]), iris[,5]) Error in log(sapply(attribs, function(v) { : Non-numeric argument to mathematical function