powered by
Calculate distance between all pairs of sites
coord2dist (coords, is.latlon = TRUE, lower.tri = TRUE)
Returns the distance between all pairs of sites
n x 4 matrix of coordinates consisting of lat or y, lon or x pairs for each each site
n
are coordinates latitudes/longitudes? Default is TRUE
TRUE
Return lower triangular part of the distance matrix? Default is TRUE
Tarik C. Gouhier (tarik.gouhier@gmail.com)
coords=rbind(c(32, -125), c(43, -130)) # Compute great circle distance coord2dist(coords)
Run the code above in your browser using DataLab