aspace (version 3.2)

calc_sdd: 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, filename="SDD_Output.txt", centre.xy=NULL, calccentre=TRUE, weighted=FALSE, weights=NULL, points=activities, verbose=FALSE)

Arguments

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
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

Value

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
SDD.radius
SDD value, radius of the SDD
SDD.area
Area of the SDD circle

Details

Use the sddloc (coordinates) and sddatt(attributes) to produce shapefiles using the convert.to.shapefile and write.shapefile from the shapefiles library

See Also

plot_sdd, calc_sde, calc_box

Examples

Run this code
## SDD example
calc_sdd(id=1, filename="SDD_Output.txt", centre.xy=NULL, calccentre=TRUE, 
weighted=FALSE, weights=NULL, points=activities, verbose=FALSE)

## plot_sdd by default takes as input the result produced from the calc_sdd, read from the current workspace. 

## SDD to shapefile example (exclude the comments below to run script)
## shp <- convert.to.shapefile(sddloc,sddatt,"id",5)
## write.shapefile(shp, "SDD_Shape", arcgis=T)

Run the code above in your browser using DataLab