distanceEarth: Calculate the distance between two points

Description Usage Arguments Value References Examples

View source: R/RcppExports.R

Description

Calculates the distance between two points on Earth, in Haversines

Usage

1
distanceEarth(lat1d, lon1d, lat2d, lon2d)

Arguments

lat1d

Numeric/Double, Latitude coordinate of point 1

lon1d

Numeric/Double, Longitude coordinate of point 1

lat2d

Numeric/Double, Latitude coordinate of point 2

lon2d

Numeric/Double, Longitude coordinate of point 2

Value

Haversine distance output, in meters

References

Haversine: CC Robusto, 1957

Examples

1
2
3
4
5
data(king_dbox)
# Calculate distance between two points
distanceEarth(king_geo$Residence_Addresses_Latitude[1], 
king_geo$Residence_Addresses_Longitude[1], 
dbox$lat[1], dbox$long[1])

Rvoterdistance documentation built on May 2, 2019, 2:08 p.m.