FAQ: Is it OK if I cross-post? - meta / Guides & FAQs - RStudio Community
as the postover on stackoverflow pointed out, the kNN function relied upon, is from an undeclared package. According to this website, there may be several possibilities : Results for 'kNN' - RDocumentation