Kjetil, your suggestion is fine for small data sets, but dist() has o(2) memory and calculation time requirements. I assume that Ryszard wanted a function that does ONLY calculate distances between all combinations of two sets of data rows for perfomance reasons. E.G. knn1 of library class having parameters train= and test= might do that internally. However, I am not aware of such a C-function directly interfaceable from R. So I like to repeat Ryszard's question as I understand it: is there any C-function in R allowing to calculate such distances efficiently? Thanks for any hints Jens Oehlschl?gel -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._