rtMoveIsland: movement to cells NESW, island model

Description Usage Arguments Value

Description

rtMoveIsland moves proportion of popn in each cell to the 4 neighbouring cells. Movers are divided equally between the 4 cardinal neighbours. In this initial version popn moving outside of the grid is lost and nothing arrives in from outside of the grid. 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) Tries to cope with nrow or ncol==1 but I think fails.

Usage

1
rtMoveIsland(m, pMove = 0.4)

Arguments

m

a matrix of cells containing a single number representing one age

pMove

proportion of popn that moves out of the cell.

Value

an updated matrix following movement


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