compute_distance: Compute the distance (or inverse distance) between locations

View source: R/tools.R

compute_distanceR Documentation

Compute the distance (or inverse distance) between locations

Description

Compute the distance (or inverse distance) between locations

Usage

compute_distance(long, lat, inv = FALSE)

Arguments

long

a vector of longitudes

lat

a vector of latitudes

inv

whether to return the inverse of the distance (default = FALSE)

Value

a square data frame (if inv = FALSE) or matrix (if inv = TRUE)

Examples

# distance Berlin/London:
compute_distance(long = c(13.41, -0.13), lat = c(52.52, 51.51))


courtiol/rangeRinPA documentation built on Sept. 29, 2022, 9:54 a.m.