...i am trying to implement random forest method in shiny , i was trying to print confusion matrix below code but didn't work . how can i solve the error .
rftrain <-reactive({
randomForest(ID~., data = train_data())
})
rfconf<-reactive({
predict(rftrain, test_data(), test_data$ID)
})
output$rft<-renderText({
confusionMatrix(rfconf,rftrain)
})
output$dtlevel<-renderText({
rfconf()
})