Haversine distance matrix | R Documentation |
Haversine distance matrix.
haversine.dist(x)
x |
A a matrix of two columns. The first column is the latitude and the second the longitude. |
The function computes the haversine distance between all observations.
A matrix with the haversine distances between all observations.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
https://en.wikipedia.org/wiki/Haversine_formula
cosnn, dirknn
x <- rvmf(10, rnorm(3), 10) x <- euclid.inv(x) haversine.dist(x)