Description Usage Arguments Value Author(s) See Also Examples
This function computes euclidean distance or distance vector for each pair of a set of spatial locations.
1 |
coord |
A matrix representing the coordinates of each locations. Each row corresponds to one location. |
vec |
Logical. If |
If vec = FALSE
, this function returns a vector that gives the
euclidean distance for each pair of locations. Otherwise, this is a
matrix where each column correspond to one dimension -
i.e. longitude, latitude, ...
Mathieu Ribatet
1 2 3 |
[1] 2.828427 5.656854 8.485281 11.313708 14.142136 2.828427 5.656854
[8] 8.485281 11.313708 2.828427 5.656854 8.485281 2.828427 5.656854
[15] 2.828427
[,1] [,2]
[1,] 2 -2
[2,] 4 -4
[3,] 6 -6
[4,] 8 -8
[5,] 10 -10
[6,] 2 -2
[7,] 4 -4
[8,] 6 -6
[9,] 8 -8
[10,] 2 -2
[11,] 4 -4
[12,] 6 -6
[13,] 2 -2
[14,] 4 -4
[15,] 2 -2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.