calc_sdd {aspace} | R Documentation |
Calculate the Standard Distance Deviation (Standard Distance)
Description
This function computes the Standard Distance Deviation (SDD) or Standard Distance from a set of points.
Usage
calc_sdd(id=1, centre.xy=NULL, calccentre=TRUE, weighted=FALSE,
weights=NULL, points=NULL, verbose=FALSE)
Arguments
id |
A unique integer to identify a SDD estimate |
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 |
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 |
Details
Use the LOCATIONS element in the output list object along with the ATTRIBUTES elements can be used to produce shapefiles or other vector point files for geographic data.
Value
The returned result is a list:
TYPE |
The type of calculation results stored in the object: BOX, SDD, SDE, CMD, CF, or CF2PTS, MNC, MDC |
DATE |
The date and time that the function was run |
ID |
Identifier for the SDD shape - it should be unique |
LOCATIONS |
Locations pertinent for the SDD that can be used with ATTRIBUTES if wishing to build a vector point file for geographic data outside of this pacakge. |
FORPLOTTING |
Coordinates and identifiers used for plotting by plot_sdd() |
ATTRIBUTES |
Attributes for the output SDD that can be used with LOCATIONS coordinates if wishing to build a vector point file for geographic data outside of this package. |
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 |
SDD.radius |
SDD value, radius of the SDD |
SDD.area |
Area of the SDD circle |
Note
Results specific for plotting are stored in the FORPLOTTING element within the produced list object. Pass the entire object to plot_sdd() and the function automatically extracts this information. 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 argument to ensure that each SDD has a unique identifier.
Author(s)
Tarmo K. Remmel, Randy Bui, Ron Buliung
See Also
calc_box
,
calc_sde
,
calc_cmd
,
calc_cf
,
calc_cf2pts
,
calc_mnc
,
calc_mdc
Examples
# SDD EXAMPLE
data(activities)
a <- calc_sdd(id=1, centre.xy=NULL, calccentre=TRUE, points=activities)
str(a)
print(a)
# IF THE RESULT OF THIS FUNCTION IS STORED TO AN OBJECT, THE plot_box()
# FUNCTION WILL TAKE THAT OBJECT AS INPUT FOR PLOTTING VIA THE datin ARGUMENT
# SDD TO SHAPEFILE EXAMPLE (REMOVE THE COMMENTS TO RUN)
# shp <- convert.to.shapefile(a$LOCATIONS, a$ATTRIBUTES,"id",5)
# write.shapefile(shp, "SDD_Shape", arcgis=T)