Skip to content
Prev 179506 / 398503 Next

How to do Naive Bayes in R?

I am wondering if anybody here have a simple example in R for Naive 
Bayes.

For example, I can do k-means clustering on the "iris" data -

data(iris)
cl <- kmeans(iris[,1:4], 3)
cl$cluster
cbind(1:150,iris$Species)

===========

But how to do Naive Bayes classification in the same "iris" data?

Many thanks!