haversine.dist: Harvesine distance matrix

View source: R/haversine.dist.R

Haversine distance matrixR Documentation

Harvesine distance matrix

Description

Haversine distance matrix.

Usage

haversine.dist(x)

Arguments

x

A a matrix of two columns. The first column is the latitude and the second the longitude.

Details

The function computes the haversine distance between all observations.

Value

A matrix with the haversine distances between all observations.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

https://en.wikipedia.org/wiki/Haversine_formula

See Also

cosnn, dirknn

Examples

x <- rvmf(10, rnorm(3), 10)
x <- euclid.inv(x)
haversine.dist(x)

Directional documentation built on Jan. 12, 2023, 1:12 a.m.