Learn R Programming

geotools (version 0.1)

distKm: Get distance between two position with coordinate in latitude, longitude

Description

distKm() returns distance in kilometer with latitude and longitude in degree

distKmRad() returns distance in kilometer with latitude and longitude in radian

degToRad() conversion degree to radian

Usage

distKm(lat0,lon0,lat1,lon1)
distKmRad(lat0,lon0,lat1,lon1) degToRad(val)

Arguments

lat0,lon0
latitude, longitude of first point
lat1,lon1
latitude, longitude of second point
val
Value, in degree.

Examples

Run this code
degToRad(180)

Run the code above in your browser using DataLab