Description Usage Arguments Value Author(s) Examples
View source: R/DistanceMatrix.R
Computes a distance matrix from a given set of polygons
(SpatialPolygonsDataFrame
)
1 | DistanceMatrix(poly, id, unit = 1000, longlat = TRUE, fun = distHaversine)
|
poly |
A |
id |
The id used to as area ids |
unit |
meters per unit in the distance matrix. The default |
longlat |
if TRUE indicates that the distance is calculated using longitude and latitude coordinates and a spherical distance functions (to be used with |
fun |
A function to compute distances with longitude and latitude coordinates (e.g., distCosine, distHaversine, distVincenty*) to be passed to |
A square distance matrix
Mathieu Cossuta, Davide Morselli, Till Junge, Sandra Penic, Guy Elcheroth
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.