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

The orthogonal dispersion of a set of points can be described using the standard deviation of the x- and y-coordinates of a set of point observations. The orthogonal dispersion can then be visualized with a Standard Deviation Box. This function computes the properties of the Standard Deviation Box (SD Box) from a set of point observations.

1 2 |

`id` |
A unique integer to identify a SD Box |

`filename` |
A string indicating the ASCII textfile where the box coordinates will be written |

`centre.xy` |
A vector of length 2, containing the x- and y-coordinates of the geographic centre of the SD Box |

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

`verbose` |
Boolean: Set to TRUE if extensive feedback is desired on the standard output |

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

The returned result is a list:

`id` |
Identifier for the SD Box shape - it should be unique |

`calccentre` |
Boolean: TRUE if the mean centre was estimated |

`weighted` |
Boolean: TRUE if the weighted mean centre was estimated |

`CENTRE.x` |
X-coordinate of the centre |

`CENTRE.y` |
Y-coordinate of the centre |

`SD.x` |
Orthogonal standard deviation in the x-axis |

`SD.y` |
Orthogonal standard deviation in the y-axis |

`Box.area` |
Area of the standard deviation box |

`NW.coord` |
North-west coordinates of SD Box |

`NE.coord` |
North-east coordinates of SD Box |

`SW.coord` |
South-west coordinates of SD Box |

`SE.coord` |
South-east coordinates of SD Box |

Results are stored in the r.BOX object (required for plot_box). 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 SD BOX has a unique identifier. The output ASCII coordinate file can be further processed using the shapefiles package to generate an ESRI Shapefile for SD BOX polygons.

Randy Bui, Ron N. Buliung, Tarmo K. Remmel

`plot_box`

, `calc_sde`

, `calc_sdd`

,
`wtd.var`

1 2 3 4 5 6 7 8 9 | ```
## BOX example
calc_box(id=1, filename="BOX_Output.txt", centre.xy=NULL, calccentre=TRUE,
weighted=FALSE, weights=NULL, points=activities, verbose=FALSE)
## plot_box by default takes as input the result produced from the calc_box, read from the current workspace.
## SD Box to shapefile example (exclude the comments below to run script)
## shp <- convert.to.shapefile(boxloc,boxatt,"id",5)
## write.shapefile(shp, "BOX_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 calccentre weighted CENTRE.x CENTRE.y SD.x SD.y Box.area
1 1 TRUE FALSE 610941.3 4830837 5943.841 4821.779 114639544
NW.coord.1 NW.coord.2 NE.coord.1 NE.coord.2 SW.coord.1 SW.coord.2 SE.coord.1
1 604997.4 4835659 616885.1 4835659 604997.4 4826016 616885.1
SE.coord.2
1 4826016
```

aspace documentation built on May 29, 2017, 7:38 p.m.

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.