R code: classification with Naive Bayes