[R] subset point data set by distance ranges
David M Warner
dmwarner at usgs.gov
Wed Dec 10 03:36:19 CET 2008
Greetings
I'm using R 2.8 with recent (last month) versions of the packages I need to
use at present.
I'm interested in examining hierarchical spatio-temporal patterns in a data
set. The data consist of 94 points (X, Y, UTM coordinates) at which catch
rates for a fish were recorded and there are also estimates of prey
available for these fish at the same locations. I have reason to believe
that the relationships between predators and prey varies with spatial scale
(nested processes).
To test this hypothesis, I'd like to generate subsets of the points that are
separated by distance ranges (1-50 km, 51-100 km, etc) so I can run Sncf
(package ncf) on the subsets.
I cannot find a way to do this with R code. Getting a distance matrix is
easy. Using that to help generate a series of distance-based subsets is
something I cannot figure out (without manually entering a list of all the
point pairs).
Any suggestions would be appreciated.
For what it's worth, I did post this question to R-sig-geo as well.
Dave Warner
David Warner
Research Fishery Biologist
USGS Great Lakes Science Center
1451 Green Road
Ann Arbor MI 48105
734.214.9392
More information about the R-help
mailing list