powered by
naiveBayes
naiveBayes(data, formula, ...)# S3 method for naiveBayes predict(object, data, ...)
# S3 method for naiveBayes predict(object, data, ...)
formula
data <- mtcars data$cyl_gr_6 <- ifelse(data$cyl > 6, 1, 0) fit <- naiveBayes(data, cyl_gr_6 ~ .) summary(fit) # Help page for function being twiddled ?e1071::naiveBayes
Run the code above in your browser using DataLab