distance_calc: Distance calculator

View source: R/distance_calc.R

distance_calcR 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)

carbonr documentation built on Oct. 17, 2024, 1:06 a.m.