basicBatchMigration: Make List of Batch Migration Parameters

Description Usage Arguments Examples

View source: R/MGDrivE-Releases.R

Description

Sets up a list containing the probability of a batch migration, the fractional amount of males/females that migrate, and the weighted probabilities for where to migrate. The default weights for migration are equal for all patches. These can be changed after running the function. This is only used in oneDay_Migration_Stochastic_Network.

Usage

1
2
3
4
5
basicBatchMigration(
  batchProbs = 1e-05,
  sexProbs = c(0.01, 0.01),
  numPatches = 1
)

Arguments

batchProbs

Probability of a batch migration, either 1 number or a vector of length equal to the number of patches

sexProbs

Population fraction of males and females that migrate. Either a vector c(M,F) or matrix of 2 columns

numPatches

Number of patches in the simulation

Examples

1
2
# to setup for 3 patches
batchMigration = basicBatchMigration(batchProbs = 1e-5, sexProbs = c(0.1, 0.01), numPatches = 3)

MGDrivE documentation built on Oct. 23, 2020, 7:28 p.m.