I am trying to calculate the distance between two points on earth using R.
library(geosphere)
library(oce)
geodDist(StoreLocations$latitude[c(26)], StoreLocations$longitude[c(26)],
CustomerLocations$latitude[c(5)], CustomerLocations$longitude[c(5)])
Putting in the Lat/Long in google maps (measure distance feature). I get total distance: 1.88 km (1.17 mi) but this is not what I am getting using the code above. I am struggling to find anyone who can assist me with this.
Store 51.68108210 -0.09732268
Customer 51.66665932 -0.08300349