object 'object' not found when fitting knn model

And the solution is....

install.packages("kknn")

You need to have the model you're setting as the engine installed. :laughing:

It was useful to use debug([function-name]) to stop the code, options(error = browser()) to step through it, and the F10 key to step forward copiously till I figured out a function called check_installs couldn't find the "kknn" model.