Skip to content
Prev 6875 / 29559 Next

sub-selecting spatial data by distance from a different (point) set

"Sean O'Riordain" seanpor at acm.org<mailto:seanpor at acm.org> writes:
who?!?!    :-)
In the package spatstat you can use the function closepairs() to do this.

Convert the data frames to objects of class 'ppp'. Then closepairs(A, B, r)
will return a list of all pairs i,j such that A[i] and B[j] are within a distance r.
The return value is a list containing vectors named i, j, d (and a few other things).

regards
Adrian Baddeley