title: Error with knn function
body: <p>I try to run this line :</p>
  
  <pre><code>knn(mydades.training[,-7],mydades.test[,-7],mydades.training[,7],k=5)
  </code></pre>
  
  <p>but i always get this error :</p>
  
  <pre><code>Error in knn(mydades.training[, -7], mydades.test[, -7], mydades.training[,  : 
    NA/NaN/Inf in foreign function call (arg 6)
  In addition: Warning messages:
  1: In knn(mydades.training[, -7], mydades.test[, -7], mydades.training[,  :
    NAs introduced by coercion
  2: In knn(mydades.training[, -7], mydades.test[, -7], mydades.training[,  :
    NAs introduced by coercion
  </code></pre>
  
  <p>Any idea please ?</p>
  
  <p>PS : mydades.training and mydades.test are defined as follow :</p>
  
  <pre><code>N &lt;- nrow(mydades) 
  permut &lt;- sample(c(1:N),N,replace=FALSE)
  ord &lt;- order(permut)
  mydades.shuffled &lt;- mydades[ord,]
  prop.train &lt;- 1/3
  NOMBRE &lt;- round(prop.train*N)
  mydades.training &lt;- mydades.shuffled[1:NOMBRE,]
  mydades.test &lt;- mydades.shuffled[(NOMBRE+1):N,]
  </code></pre>