nearest_facility_distances: (Internal) Calculate the nearest facility distances

View source: R/utils.R

nearest_facility_distancesR Documentation

(Internal) Calculate the nearest facility distances

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

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. 27, 2024, 7:51 a.m.