Using the iris dataset in R I have come up with two different subsets.
test <- iris[seq(1, nrow(iris), by = 5),]
training <- iris[-seq(1, nrow(iris), by = 5),]
I'm now looking for the k nearest neighbor using k=1. Here's my attempt and output.
knn(test, k = 1, prob=TRUE)
**Error in knn(test, k = 1, prob = TRUE) :
argument "test" is missing, with no default**
Why is this telling me that "test" is missing? Thanks