knn assignment in R