View source: R/distance_calc.R
distance_calc | R Documentation |
Calculate distances between locations in miles using the Haversine formula. This is calculated as the crow flies.
distance_calc(lat1, lat2, long1, long2)
lat1 |
Latitude of the first location. |
lat2 |
Latitude of the second location. |
long1 |
Longitude of the first location. |
long2 |
Longitude of the second location. |
Distance between locations in miles
# Distance between the London Eye and the Eiffel Tower in miles
distance_calc(51.5033, 48.8584, 0.1196, 2.2945)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.