[R] dist

Agustin Lobo alobo at ija.csic.es
Mon Nov 19 15:08:20 CET 2001


Hi list!

I'm computing multivar. distances from a set of centroids
to a (large) set of individuals. I'm now just using rbind
to create a matrix (x) with the centroid and the individuals,
then run as.matrix(dist(x)) and finally select the appropriate columns,
as I'm not interested on the distances among individuals.
Therefore, this procedure implies a waste of computing time.
Is there any way to use dist only between each individual
and the centroids (avoiding loops in R)? or should I just go and try to
make
a modified version of dist by hacking the C code?

Thanks

Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list