get_dist_mat: Get the distance matrix

Description Usage Arguments Value

View source: R/places.R

Description

Get the distance matrix between two data frames that have "longitude" and "latitude" columns

Usage

1
get_dist_mat(pop, places, dist_fxn = haversine_dist)

Arguments

pop

data frame of the population with m rows

places

data frame of places to assign with n rows

dist_fxn

currently "haversine" with args for x1, y1, x2, y2, returning a scalar value between 0 and 1

Value

m x n matrix with scaled distance between 0 and 1. Eg. Entry ij means that the scaled distance between row i from pop and row j from places is entry ij.


leerichardson/spew documentation built on May 21, 2019, 1:39 a.m.