Compute shortest distances or paths to selected pumps.
nearestPump(pump.select = NULL, metric = "walking", vestry = FALSE,
weighted = TRUE, case.set = "observed", distance.unit = "meter",
time.unit = "second", walking.speed = 5, multi.core = TRUE,
dev.mode = FALSE)
An R data frame or list of 'igraph' path nodes.
Numeric. Pump candidates to consider. Default is NULL
: all pumps are used. Otherwise, selection by a vector of numeric IDs: 1 to 13 for pumps
; 1 to 14 for pumps.vestry
. Negative selection allowed.
Character. "euclidean" or "walking".
Logical. TRUE
uses the 14 pumps from the Vestry Report. FALSE
uses the 13 in the original map.
Logical. TRUE
computes shortest path in terms of road length. FALSE
computes shortest path in terms of the number of nodes.
Character. "observed", "expected", or "snow".
Character. Unit of distance: "meter", "yard" or "native". "native" returns the map's native scale. Meaningful only when "weighted" is TRUE
. See vignette("roads")
for information on unit distances.
Character. "hour", "minute", or "second".
Numeric. Walking speed in km/hr.
Logical or Numeric. TRUE
uses parallel::detectCores()
. FALSE
uses one, single core. You can also specify the number logical cores. See vignette("Parallelization")
for details.
Logical. Development mode uses parallel::parLapply().