simulateFatalities {cholera}R Documentation

Generate simulated fatalities.

Description

Places regularly spaced "simulated" or "expected" cases across the face of the map. The function finds the "addresses" of cases 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 = TRUE,
  simulated.obs = 20000L, dev.mode = FALSE)

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()). See vignette("Parallelization") for details.

simulated.obs

Numeric. Number of sample cases.

dev.mode

Logical. Development mode uses parallel::parLapply().

Value

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

Note

This function is computationally intensive. With "simulated.obs" set to 20,000 simulated cases (actually generating 19,993 cases). This function documents the code that generates sim.ortho.proj and regular.cases. In real world terms, the distance between of these simulated cases is approximately 6 meters.


[Package cholera version 0.8.0 Index]