% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{nearest_facility_distances}
\alias{nearest_facility_distances}
\title{(Internal) Calculate the nearest facility distances}
\usage{
nearest_facility_distances(existing_facility, user)
}
\arguments{
\item{existing_facility}{dataframe of existing facilities}

\item{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.
}
\description{
This function is a wrapper for the similarly named, \code{nearest_facility_dist}
function used inside \code{max_coverage} to calculate distances
so that the nearest facilities can be found.
}
