get_distance: Distance between two geographic entities

Description Usage Arguments Examples

Description

This function allows you to get distances between two geographic entities.

Usage

1
2
3
get_distance(origin, destination, year = 2012, theta = -1,
  data = NULL, code_format = "iso3c", data_url = NULL,
  data_store = T)

Arguments

origin

Vector containing origin entities. (character)

destination

Vector containing destination entities. (character)

year

Vector containing years between 1992 and 2012, defaults to 2012 (numeric)

theta

Vector containing theta value between -1 and 1, defaults to -1 for the harmonic mean. Set to 0 for geometric mean, 1 for arithmetic mean. (numeric)

data

Data.table with computed distances, defaults to gravity.distances::distances_data

code_format

Character string indicating format of origin and destination corresponding to the countrycode package. Defaults to "iso3c".

data_url

Character string indicating url from which data should be downloaded.

data_store

Logical indicator whether downloaded data should be stored permanently.

Examples

1
get_distance("DEU", "CAN")

julianhinz/gravity.distances documentation built on Aug. 26, 2020, 9:33 a.m.