really thxs to David Winsemius.. this websits helps a lot, -- View this message in context: http://r.789695.n4.nabble.com/function-to-do-the-knn-tp3781137p3786251.html Sent from the R help mailing list archive at Nabble.com.