Skip to contents

Get the distance in kilometers between two points

Usage

get_distances(lat1, long1, lat2, long2, R = 6371)

Arguments

lat1

Latitude in decimals

long1

Longitude in decimals

lat2

Latitude in decimals

long2

Longitude in decimals

R

Radius of the earth in kmdescription (R=6371)

Value

A numeric vector with the distance in kilometers.

#' source: https://github.com/gustavobio/brclimate/blob/master/R/get_distances.R