49
in
the input point dataset (calculates distances between points within this
dataset - but see ’in2’)
d
the unique ID eld in the input dataset
out
the output delimited text le to create
[in2]
the second point layer (calculates distances between points between
datasets)
[
d2]
the unique ID eld in the second input dataset (MUST be specied if
’in2’ is specied)
[format]
the structure of the output table: 1D (default, one record per row), 2D
(an NxN matrix), SUMMARY (summary statistics for each point only)
(options: 1D, 2D, SUMMARY)
[nearest]
the number of nearest neighbours to identify for each input point (de-
fault=0); note that ’nout’ must also be specied with this option
[nout]
the output delimited text le to create for the nearest neighbour dataset
[multiplier] multiplies the distance by this value before writing to output (default=1)
[median]
(TRUE/FALSE) determines whether the median is also calculated if the
’summary’ format is specied (this can add considerably to processing
time for large datasets, default=FALSE)
[where]
the lter/selection statement that will be applied to the rst (’in’, not
’in2’) point feature class to identify a subset of points to process
Example
pointdistances(in="C:ndatanlocs.shp",
d="RECID", out="C:ndatandistances.csv",
format="SUMMARY", multiplier=0.001);
pointdistances(in="C:ndatanpredators.shp",
d="ANID", out="C:ndatandistances.csv",
in2="C:ndatanprey.shp",
d2="PREYID");
pointdistances(in="C:ndatanrestations.shp",
d="STID", out="C:ndatandistances.csv",
in2="C:ndatanhouses.shp",
d2="PROPID", nearest=10,
nout="C:ndatannearestheigh.csv", median=TRUE);
3.83 r
Executes An R Command: Executes R commands.
Description
The r() command is dierent from most other GME commands in that it takes the text
within the parentheses and sends it directly to R, without any interpretation of the text. For
this reason you should not enclosethe R command text within quotes: write the R commands
here exactly as you would write them in R. This command does not recover any R objects,
but you can use the r.ls() command to view a list of objects in the current R session.
This command is designed to be used in conjunction with the following commands:
r.loaddata, r.writedatatoeld, r.writedatatoraster. One of the most important uses of this
114