SpaDES (version 1.1.4)

specificNumPerPatch: specificNumPerPatch

Description

Instantiate a specific number of agents per patch. The user can either supply a table of how many to initiate in each patch, linked by a column in that table called pops.

Usage

specificNumPerPatch(patches, numPerPatchTable = NULL, numPerPatchMap = NULL)

Arguments

patches
RasterLayer of patches, with some sort of a patch id.
numPerPatchTable
A data.frame or data.table with a column named pops that matches the patches patch ids
numPerPatchMap
A RasterLayer exactly the same as patches but with agent numbers rather than ids as the cell values per patch.

Value

  • A raster with 0s and 1s, where the 1s indicate starting locations of agents following the numbers above.