#INPUT DATA
peduliaku=read.delim("clipboard")
View(peduliaku)
#MEMANGGIL PACKAGES
library(e1071)
library(caret)
#MEMBAGI DATA MENJADI 2 BAGIAN
sampel=sample(1:nrow(peduliaku),0.6*nrow(peduliaku),replace=TRUE)
training=data.frame(peduliaku)[sampel,]
testing=data.frame(peduliaku)[-sampel,]
#MEMBUAT MODEL NAVIEBAYES
modelNB=naiveBayes(VALUE~.,data=training)
#MELAKUKUAN PREDIKSI
prediksi=predict(modelNB,testing)
hasil=confusionMatrix(table(prediksi,testing$VALUE))
hasil
if i run the program in NB appear the message!
Error in table(prediksi, testing$VALUE) :
all arguments must have the same length
can you all helpme to fix the error.?
thankss help me for campus work