addEuclideanPath: Add the path for the Euclidean distance between cases and/or...

View source: R/addEuclideanPath.R

addEuclideanPathR Documentation

Add the path for the Euclidean distance between cases and/or pumps.

Description

Add the path for the Euclidean distance between cases and/or pumps.

Usage

addEuclideanPath(origin = 1, destination = NULL, type = "case-pump",
  case.location = "address", case.set = "observed", vestry = FALSE,
  distance.unit = "meter", time.unit = "second", walking.speed = 5,
  mileposts = TRUE, milepost.unit = "distance", milepost.interval = NULL,
  alpha.level = 1)

Arguments

origin

Numeric or Integer. Numeric ID of case or pump.

destination

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.

type

Character "case-pump", "cases" or "pumps".

case.location

Character. For case.set = "observed": "address" or "orthogonal". "address" is the x-y coordinate of a bar. "orthogonal" is the x-y coordinate of a stack's "anchor" case.

case.set

Character. "observed" or "expected".

vestry

Logical. TRUE uses the 14 pumps from the Vestry Report. FALSE uses the 13 pumps from the original map.

distance.unit

Character. Unit of distance: "meter", "yard" or "native". "native" returns the map's native scale. See vignette("roads") for information on unit distances.

time.unit

Character. "hour", "minute", or "second".

walking.speed

Numeric. Walking speed in km/hr.

mileposts

Logical. Plot mile/time posts.

milepost.unit

Character. "distance" for mileposts; "time" for timeposts.

milepost.interval

Numeric. Sets interval between milepost.unit.

alpha.level

Numeric. Alpha level transparency for path: a value in [0, 1].

Value

An R list with 3 data frames: x-y coordinates for the origin and destination, and a summary of results.

Note

Walking time is computed using distanceTime().


lindbrook/cholera documentation built on April 29, 2024, 12:22 p.m.