distance_calc {carbonr} | R Documentation |
Distance calculator
Description
Calculate distances between locations in miles using the Haversine formula. This is calculated as the crow flies.
Usage
distance_calc(lat1, lat2, long1, long2)
Arguments
lat1 |
Latitude of the first location. |
lat2 |
Latitude of the second location. |
long1 |
Longitude of the first location. |
long2 |
Longitude of the second location. |
Value
Distance between locations in miles
Examples
# Distance between the London Eye and the Eiffel Tower in miles
distance_calc(51.5033, 48.8584, 0.1196, 2.2945)
[Package carbonr version 0.2.1 Index]