ths a lot, david. it helps a lot -- View this message in context: http://r.789695.n4.nabble.com/function-to-do-the-knn-tp3781137p3786253.html Sent from the R help mailing list archive at Nabble.com.