View source: R/miscellaneous.R
greatCircleDistanceM | R Documentation |
Gives the "great circle" or "haversine" distance between pairs of lat/lng coordinates in meters.
greatCircleDistanceM(aLat, aLng, bLat, bLng)
aLat |
vector of latitude cooridnates (from) |
aLng |
vector of longitude coordinates (from) |
bLat |
vector of latitude coordinates (to) |
bLng |
vector of longitude coordinates (to) |
numeric vector giving the great circle distance in metres
greatCircleDistanceM(
aLat = c(-37.820197)
, aLng = c(144.983324)
, bLat = c(-37.818476)
, bLng = c(144.967354)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.