rtMove: movement to neighbouring cells with reflecting area...

Description Usage Arguments Details Value See Also Examples

Description

rtMove moves proportion of popn in each cell to the 4 neighbouring cells can be dependent on vegetation dependent on arguments. This function works on a single age class, it can be made to work on multiple age classes by passing an array[y,x,age] to aaply(.margins=3). Optional arguments allow the function to be used in different ways.

Usage

1
2
3
4
rtMove(m = array(c(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), dim = c(3, 4)),
  mNog = NULL, mVegMove = NULL, aVegMoveMult = NULL, mVegCats = NULL,
  dfMoveByVeg = NULL, iBestVeg = NULL, aVegDifMult = NULL, pMove = 0.4,
  verbose = FALSE)

Arguments

m

a matrix of cells containing a single number representing one age

mNog

optional matrix of cells of 0&1, 0 for nogo areas

mVegMove

optional matrix of vegetation movement modifiers >1 increases movement out of the cell, <1 decreases movement out of the cell

aVegMoveMult

optional array of grids used internally to represent movement dependent on vegetation, can be created by rtSetVegMoveGrids

mVegCats

optional matrix of vegetation categories

dfMoveByVeg

dataframe specifying a movement multiplier for each vegetation category

iBestVeg

optional preferred vegetation number (1-5) for this species

aVegDifMult

optional array of grids used internally to represent movement across vegetation boundaries, can be created by rtSetVegDifGrids

pMove

proportion of popn that moves out of the cell.

verbose

print what it's doing T/F

Details

Argument options :

1 m, pMove : Simple movement with reflecting boundaries.

2 m, pMove, mNog : Avoidance of no-go areas.

3 Vegetation dependent movement :
m, pMove, aVegMoveMult : Probabilities precalculated for speed by rtSetVegMoveGrids.
m, pMove, mVegMove : Probabilities from a matrix. Slower if called repeatedly.
m, pMove, mVegCats, dfMoveByVeg : Probabilities calculated from vegetation categories and a lookup.

4 Movement influenced by difference in vegetation between source and sink cells :
m, pMove, aVegDifMult : Probabilities precalculated for speed by rtSetVegDifGrids.
m, pMove, mVegCats, iBestVeg : Probabilities calculated from vegetation categories and the best vegetation index.

Options from 2,3 & 4 can be combined. See vignette("vignette-movement", package="rtsetse")

Doesn't try to cope with nrow or ncol==1.

Value

an updated matrix following movement

See Also

vignette("vignette-movement", package="rtsetse")

Examples

1
rtMove(verbose=TRUE)

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