[R] avoiding loops

dax42 Dax42 at web.de
Fri Jan 28 22:41:46 CET 2005


Hi again,

thanks a lot for the quick answer. I just forgot the comma, always 
these stupid mistakes...

Anyways, as I said before, I have two data.frames containing about 1000 
rows and I would like to avoid looping through all of them...

In each data.frame are coordinates (x,y,z), so every row is giving the 
information on one single point.
I would like to calculate the distance from each point in the one frame 
to every point in the second...
But how to do this without loops, how to do it quickly? I would 
appreciate it very much, if someone would introduce me to the high art 
of R - avoiding loops :-).

Cheers, Dax.




More information about the R-help mailing list