Description Usage Arguments Value
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.
1 | rtMoveIsland(m, pMove = 0.4)
|
m |
a matrix of cells containing a single number representing one age |
pMove |
proportion of popn that moves out of the cell. |
an updated matrix following movement
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.