R/getNumberOfDepots.R

Defines functions getNumberOfDepots

Documented in getNumberOfDepots

#' Returns the number of depots of a network.
#'
#' @template arg_network
#' @return [\code{integer(1)}]
#' @export
getNumberOfDepots = function(x) {
  assertClass(x, "Network")
  if (hasDepots(x)) {
    return(nrow(x$depot.coordinates))
  }
  return(0L)
}

Try the netgen package in your browser

Any scripts or data that you put into this service are public.

netgen documentation built on Jan. 9, 2020, 1:07 a.m.