rt_runGrid: spatial tsetse population simulation with mortality varying...

Description Usage Arguments Details Value Examples

Description

rt_runGrid is the main function of the rtsetse package to run a spatial simulation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
rt_runGrid(mVegCats = array(c("D", "T", "O", "S", "N", "N"), dim = c(2, 3)),
  dfMortByVeg = data.frame(code = c("D", "T", "O", "S", "B", "G", "N"),
  mortality = c(200, 150, 110, 100, 110, 210, 999), pupmortality = c(120, 110,
  105, 100, 120, 170, 999), stringsAsFactors = FALSE),
  dfMoveByVeg = data.frame(code = c("D", "T", "O", "S", "B", "G", "N"), move =
  c(0.85, 0.9, 0.95, 1, 1.05, 1.1, 0)), iBestVeg = 4, pMoveF = 0.6,
  pMoveM = 0.3, iDays = 4, iMaxAge = 120, iCarryCapF = 200,
  fMperF = 0.5, fStartPopPropCC = 1, pMortF = 0.05, pMortM = 0.05,
  iMortMinAgeStart = 10, iMortMinAgeStop = 50, fMortMinProp = 0.2,
  fMortOldProp = 0.3, propMortAdultDD = 0.25, pMortPupa = 0.25,
  propMortPupaDD = 0.25, iPupDurF = 26, iPupDurM = 28, iFirstLarva = 16,
  iInterLarva = 10, pMortLarva = 0.05, propMortLarvaDD = 0.25,
  pControl = 0, iControlBorder = 8, verbose = FALSE, report = NULL)

Arguments

mVegCats

a matrix or filepath for a map of vegetation codes

dfMortByVeg

a dataframe or filepath to a lookup table specifying mortality multiplier (percent) for each vegetation type

dfMoveByVeg

dataframe specifying a movement multiplier for each vegetation category

iBestVeg

the index of the preferred vegetation for this species, used in influencing movement

pMoveF

probability of F moving between cells

pMoveM

probability of M moving between cells

iDays

days to run simulation

iMaxAge

max age of fly allowed in model (will warn if flies age past this)

iCarryCapF

carrying capacity of adult females

fMperF

numbers of males per female, default 0.5 for half as many M as F

fStartPopPropCC

starting population as a proportion of carrying capacity, default = 1 option "sameAsAdults" to set tot pupae same as tot adults.

pMortF

adult female mortality on day1, rates on later days are determined by following parameters.

pMortM

adult male mortality on day1, rates on later days are determined by following parameters.

iMortMinAgeStart

Age at which min death rates start.

iMortMinAgeStop

Age at which min death rates stop.

fMortMinProp

What proportion of the maximum death rate on day 0 is the minimum death rate.

fMortOldProp

What proportion of the maximum death rate on day 0 is the death rate after iDeathMinAgeStop.

propMortAdultDD

proportion of adult mortality that is density dependent

pMortPupa

pupal mortality per period

propMortPupaDD

proportion of pupal mortality that is density dependent

iPupDurF

days it takes pupa(F) to develop

iPupDurM

days it takes pupa(M) to develop

iFirstLarva

Age that female produces first larva

iInterLarva

Inter-larval period

pMortLarva

larval mortality per period

propMortLarvaDD

proportion of larval mortality that is density dependent

pControl

extra mortality probability due to control, first go at implementing control. TODO improve this

iControlBorder

width (in cells) of border area not to control

verbose

print what it's doing T/F

report

filename for a report for this run, if not specified no report is produced

Details

This accepts a grid of vegetation and how mortality varies by vegetation.

Value

a multi-dimensional array [day,y,x,sex,ages]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
tst <- rt_runGrid()
rtPlotMapPop(tst)
#now try an unequal matrix
mCarryCapF <- matrix( 10*(1:16), 4, 4)
tst <- rt_runGrid(mCarryCapF)
rtPlotMapPop(tst) 
#an unequal matrix starting at a fraction of CC
tst <- rt_runGrid(mCarryCapF, fStartPopPropCC = 0.5)
rtPlotMapPop(tst) 

## End(Not run)

AndySouth/rtsetse documentation built on May 5, 2019, 6:02 a.m.