I am trying to test some code in R, but it keeps giving me an error that the tilde key (~) is an unexpected symbol?
Is there something that can be done to fix this?
This was one of the codes I was trying to run:
# kNN
set.seed(123)
fit.knn <- train(job permanency~., data=dataset, method="knn", metric=metric, preProc=c("permanency rate", "job skills"), trControl=control)
and I get the following error
Error: unexpected symbol in "fit.knn <- train(job permanency"