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. |
multi.core |
Logical or Numeric. |
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.