Learn R Programming

synchrony (version 0.3.8)

latlon2dist: latlon2dist

Description

Calculate distance between a pair of coordinates

Usage

latlon2dist (coords)

Arguments

coords

4-element vector of coordinates with format: (lat1, lon1, lat2, lon2)

Value

Returns the great circle distance distance between the pair of coordinates

See Also

coord2dist

Examples

Run this code
# NOT RUN {
coords=c(32, -125, 43, -130)
# Compute great circle distance
latlon2dist(coords)
# }

Run the code above in your browser using DataLab