coord2dist: coord2dist

Description Usage Arguments Value Author(s) Examples

Description

Calculate distance between all pairs of sites

Usage

1
coord2dist (coords, is.latlon = TRUE, lower.tri = TRUE)

Arguments

coords

n x 4 matrix of coordinates consisting of lat or y, lon or x pairs for each each site

is.latlon

are coordinates latitudes/longitudes? Default is TRUE

lower.tri

Return lower triangular part of the distance matrix? Default is TRUE

Value

Returns the distance between all pairs of sites

Author(s)

Tarik C. Gouhier (tarik.gouhier@gmail.com)

Examples

1
2
3
coords=rbind(c(32, -125), c(43, -130))
# Compute great circle distance
coord2dist(coords)

synchrony documentation built on March 26, 2020, 7:14 p.m.