From: <adrian_at_maths.uwa.edu.au>

Date: Fri, 14 Mar 2008 12:52:42 +0900 (WST)

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 14 Mar 2008 - 03:56:29 GMT

Date: Fri, 14 Mar 2008 12:52:42 +0900 (WST)

Andrew McFadden <Andrew.McFadden_at_maf.govt.nz> writes:

> I am trying to determine the distances between two datasets of x and y

*> points.
*

This can be done efficiently in the package 'spatstat'.

library(spatstat) crossdist(x1, y1, x2, y2)

where x1, y1 are vectors of coordinates for the first set of points and x2, y2 for the second set. See help(crossdist.default)

This is executed in C and is faster than using outer() or apply().

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 14 Mar 2008 - 03:56:29 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Fri 14 Mar 2008 - 15:30:23 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*