nearest_facility_distances: (Internal) Calculate the nearest facility distances

Description Usage Arguments Value

View source: R/utils.R

Description

This function is a wrapper for the similarly named, nearest_facility_dist function used inside max_coverage to calculate distances so that the nearest facilities can be found.

Usage

1
nearest_facility_distances(existing_facility, user)

Arguments

existing_facility

dataframe of existing facilities

user

dataframe of users to place facilities to cover

Value

A tibble with 3 columns: user_id, facility_id, distance, where the user_id is the identifier for the user, the facility_id is the identifier for the facility that is closest to that user, and the distance is the distance in metres from that user to that facility.


njtierney/maxcovr documentation built on Nov. 13, 2019, 6:38 p.m.