Description Usage Arguments Value See Also Examples
Computes distances between lat/lon data points.
1 |
lat |
Latitude of first coordinate or list with lat, lon of first coordinate. |
lon |
Longitude of first coordinate or list with lat, lon of second coordinate. |
lat1,lon1 |
If lat and lon are vectors of lat,lon positions, then lat1 and lon1 must be given as the second set of positions. |
scale |
|
A single vector of distances between pairs of points is returned
1 2 3 4 5 6 7 8 | pos1 <- list(lat = c(65, 66), lon = c(-19, -20))
pos2 <- list(lat = c(64, 65), lon = c(-19, -20))
dists <- arcdist(pos1, pos2) # pos1 and pos2 are lists of coordinates.
lat <- c(65, 66)
lon <- c(-19, -20)
lat1 <- c(64, 65)
lon1 <- c(-19, -20)
dists <- arcdist(lat, lon, lat1, lon1) # Input in vector format.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.