Description Usage Arguments Details Value Note Author(s) See Also Examples

This function computes the Standard Distance Deviation (SDD) or Standard Distance from a set of points.

1 2 |

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

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

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 |

Results are stored in the r.SDD object (required for plot_sdd). 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 shapefiles package to generate an ESRI Shapefile for SDD polygons.

Randy Bui, Ron Buliung, Tarmo K. Remmel

1 2 3 4 5 6 7 8 9 | ```
## 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)
``` |

```
Loading required package: splancs
Loading required package: sp
Spatial Point Pattern Analysis Code in S-Plus
Version 2 - Spatial and Space-Time analysis
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: 'Hmisc'
The following object is masked from 'package:splancs':
zoom
The following objects are masked from 'package:base':
format.pval, round.POSIXt, trunc.POSIXt, units
Loading required package: shapefiles
Loading required package: foreign
Attaching package: 'shapefiles'
The following objects are masked from 'package:foreign':
read.dbf, write.dbf
$id
[1] 1
$calccentre
[1] TRUE
$weighted
[1] FALSE
$CENTRE.x
[1] 610941.3
$CENTRE.y
[1] 4830837
$SDD.radius
[1] 8117.952
$SDD.area
[1] 207034548
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.