Learn R Programming

cholera (version 0.5.1)

simulateFatalities: Generate simulated fatalities and their orthogonal projection on road network.

Description

Places regularly spaced "simulated" or "expected" cases across the face of the map. The function finds the "addresses" of cases on the road network via orthogonal projection (or simple proximity). These data are used to generate "expected" pump neighborhoods. The function relies on sp::spsample() and sp::Polygon().

Usage

simulateFatalities(compute = FALSE, multi.core = FALSE,
  simulated.obs = 20000L)

Arguments

compute

Logical. TRUE computes data. FALSE uses pre-computed data. For replication of data used in the package,

multi.core

Logical or Numeric. TRUE uses parallel::detectCores(). FALSE uses one, single core. With Numeric, you specify the number logical cores (rounds with as.integer()). On Windows, only multi.core = FALSE is available.

simulated.obs

Numeric. Number of sample cases.

Value

An R list with two elements: sim.ortho.proj and regular.cases