Learn R Programming

cholera (version 0.5.1)

addCases: Add observed cases by walking neighborhood.

Description

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

Usage

addCases(pump.subset = NULL, pump.select = NULL, type = "address",
  token = "point", text.size = 0.5, vestry = FALSE,
  weighted = TRUE, color = NULL, multi.core = FALSE, ...)

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.

type

Character. Type of case: "address" (base of stack) or "fatalities" (entire stack).

token

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

text.size

Numeric. Size of case ID text.

vestry

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

weighted

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

color

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

multi.core

Logical or Numeric. TRUE uses parallel::detectCores(). FALSE uses one, single core. You can also specify the number logical cores. On Windows, only multi.core = FALSE is available.

...

Additional plotting parameters.

Examples

Run this code
# NOT RUN {
snowMap(add.cases = FALSE)
addCases(pump.subset = c(6, 10))

snowMap(add.cases = FALSE)
addCases(pump.select = c(6, 10))
# }

Run the code above in your browser using DataLab