Add the shortest walking path between a selected cases or pumps.
addWalkingPath(origin = 1, destination = NULL, type = "case-pump",
observed = TRUE, weighted = TRUE, vestry = FALSE,
distance.unit = "meter", time.unit = "second", walking.speed = 5,
unit.posts = "distance", unit.interval = NULL, alpha.level = 1)
An R list with two elements: a character vector of path nodes and a data frame summary.
Numeric or Integer. Numeric ID of case or pump.
Numeric or Integer. Numeric ID(s) of case(s) or pump(s). Exclusion is possible via negative selection (e.g., -7). Default is NULL
: this returns closest pump or "anchor" case. Character landmark name (case insensitive).
Character "case-pump", "cases" or "pumps".
Logical. Use observed or "simulated" expected data.
Logical. TRUE
computes shortest path in terms of road length. FALSE
computes shortest path in terms of nodes.
Logical. TRUE
uses the 14 pumps from the Vestry Report. FALSE
uses the 13 in the original map.
Character. Unit of distance: "meter", "yard" or "native". "native" returns the map's native scale. unit
is 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.
Character. "distance" for mileposts; "time" for timeposts.
Numeric. Sets interval between posts: for "distance", the default is 50 meters; for "time", the default is 60 seconds.
Numeric. Alpha level transparency for path: a value in [0, 1].
streetNameLocator("broad street", zoom = TRUE, highlight = FALSE,
add.subtitle = FALSE)
addWalkingPath(447)
Run the code above in your browser using DataLab