addNeighborhoodCases {cholera}R Documentation

Add observed cases by neighborhood.

Description

Add cases to a plot as "address" or "fatalities" and as points or IDs.

Usage

addNeighborhoodCases(pump.subset = NULL, pump.select = NULL,
  metric = "walking", type = "stack.base", token = "point",
  text.size = 0.5, pch = 16, point.size = 0.5, vestry = FALSE,
  weighted = TRUE, color = NULL, case.location = "nominal",
  alpha.level = 0.5, multi.core = TRUE)

Arguments

pump.subset

Numeric. Vector of numeric pump IDs to subset from the neighborhoods defined by pump.select. Negative selection possible. NULL uses all pumps in pump.select.

pump.select

Numeric. Numeric vector of pump IDs that define which pump neighborhoods to consider (i.e., specify the "population"). Negative selection possible. NULL selects all pumps.

metric

Character. Type of neighborhood: "euclidean" or "walking".

type

Character. Type of case: "stack.base" (base of stack), or "stack" (entire stack). For observed = TRUE.

token

Character. Type of token to plot: "point" or "id".

text.size

Numeric. Size of case ID text.

pch

Numeric.

point.size

Numeric.

vestry

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

weighted

Logical. TRUE computes shortest walking path weighted by road length. FALSE computes shortest walking path in terms of the number of nodes.

color

Character. Use a single color for all paths. NULL uses neighborhood colors defined by snowColors().

case.location

Character. For metric = "euclidean": "address" uses ortho.proj; "nominal" uses fatalities.

alpha.level

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

multi.core

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.

Examples

## Not run: 
snowMap(add.cases = FALSE)
addNeighborhoodCases(pump.subset = c(6, 10))

snowMap(add.cases = FALSE)
addNeighborhoodCases(pump.select = c(6, 10))

## End(Not run)

[Package cholera version 0.7.5 Index]