#Create ida data frame
idf <- ida.data.frame("IRIS")
#Create a naive bayes model
nb <- idaNaiveBayes(Species~SepalLength,idf,"ID")
#Print the model
print(nb)
#Apply the model to data
idf2 <- predict(nb,idf,"ID")
#Inspect the results
head(idf2)Run the code above in your browser using DataLab