Loading the geosphere package you can use a number of different functions
library(geosphere)
distm(c(lon1, lat1), c(lon2, lat2), fun = distHaversine)
Also:
distHaversine()
distMeeus()
distRhumb()
distVincentyEllipsoid()
distVincentySphere()
…
Loading the geosphere package you can use a number of different functions
library(geosphere)
distm(c(lon1, lat1), c(lon2, lat2), fun = distHaversine)
Also:
distHaversine()
distMeeus()
distRhumb()
distVincentyEllipsoid()
distVincentySphere()
…