title: adjusting the K in knn train() command in R
body: <p>I'm trying to classify with the knn algorithm. My question is how do I adjust the number of neighbors the algorithm uses? </p>
  
  <p>For example, I want to use 3, 9 and 12? <br/>
  How do I adjust this in the command? </p>
  
  <pre><code>species_knn = train(species ~., method= "knn", data = species, trControl=trainControl(method = 'cv', number = 3))
  </code></pre>