calc_sdd {aspace} | R Documentation |
This function computes the Standard Distance Deviation (SDD) or Standard Distance from a set of points.
calc_sdd(id=1, filename="SDD_Output.txt", centre.xy=NULL, calccentre=TRUE, weighted=FALSE, weights=NULL, CMD.npts=10000, points=activities, verbose=FALSE)
id |
A unique integer to identify a SDD estimate |
filename |
A string indicating the ASCII textfile where shape coordinates will be written |
centre.xy |
A vector of length 2, containing the x- and y-coordinates of the SDD centre |
calccentre |
Boolean: Set to TRUE if the mean center is to be calculated |
weighted |
Boolean: Set to TRUE if the weighted mean center is to be computed with weighted coordinates |
weights |
Weights applied to point observations, number of weights should equal the number of observations |
CMD.npts |
The approximate number of points to generate for the centre of minimum distance (CMD) calculation |
points |
A 2-column matrix or data frame containing the set of point observations input to the calc_sdd function |
verbose |
Boolean: Set to TRUE if extensive feedback is desired on the standard output |
This function is most powerful when used repetitively within a loop to compute the SDD for subsets of points stored in a large table.
The result is a list of terms:
id |
Identifier for the SDD shape - it should be unique |
calccentre |
Boolean: TRUE if mean centre is computed |
weighted |
Boolean: TRUE if the weighted mean centre is to be used instead |
CENTRE.x |
X-coordinate of the centre |
CENTRE.y |
Y-coordinate of the centre |
central.x |
X-coordinate of the identified central feature |
central.y |
Y-coordinate of the identified central feature |
median.x |
X-coordinate of median centre, median value of the X-coordinate vector |
median.y |
Y-coordinate of median centre, median value of the Y-coordinate vector |
CMD.x |
X-coordinate of estimated centre of minimum distance |
CMD.y |
Y-coordinate of estimated centre of minimum distance |
SDD.radius |
SDD value, radius of the SDD |
SDD.area |
Area of the SDD circle |
Results are stored in the r.SDD object (required for graphical visualization using plot_sdd). As the value of 'CMD.npts' increases, the more precise the centre of minimum distance is estimated. This function can be used on its own (once) or repetitively in a loop to process grouped point data stored in a larger table. When used repetitively, be sure to increment the id parameter to ensure that each SDD has a unique identifier. The output ASCII coordinate file can be further processed using the makeshapes function to generate an ESRI Shapefile for SDD polygons.
Randy Bui, Ron Buliung, Tarmo K. Remmel
plot_sdd
, calc_mcp
,
calc_sde
, calc_box
,
ellipse3
, makeshapes
,
mcp
, gridpts
calc_sdd(id=1, filename="SDD_Output.txt", centre.xy=NULL, calccentre=TRUE, weighted=TRUE, weights=wts, CMD.npts=10000, points=activities, verbose=TRUE)