This is one of the ways in which KNN algorithm is implemented on cancer dataset. The Breast cancer dataset is attached in the repo. You need to have R studio to run the file and also you need to install "class" & "gmodels" packages of R, to run the code smoothly.