I am trying to use k-fold validation to find the better k for kNN. But while I run the following code, it appeared error of "Wrong model type for classification". I had referred to the previous similar question ("Wrong model type for classification" in regression problems in R-Caret) but still can't figure out what is the mistake I made for my code.
The data classes are 11 quantitative, 13 quantitative variables (incl. 1 responding variable named:"classification")
install.packages("caret")
library(caret)
control <- trainControl(method="cv",number = 10)
model <- train(classification ~ .,data = CKD.train, method = "knn", trControl = control)
print(model)