Description Usage Arguments Details Value Author(s) Examples
The set of rules for the Game of Life.
1 | liferules(lraster, nearNA=F)
|
lraster |
A raster where living and dead cells are processed. |
nearNA |
If TRUE, then alive cells near NSs (ocean) live forever. |
This function accepts a raster with ones and zeros (alive and dead cells) and processes each living cell accordingly to the original rules. However, since the raster is not and infinite plane, living cells at the edge of the raster are eliminated. If a cell has an NA neighbor, and if nearNA is set to TRUE, then that cell lives forever.
A raster representing the alive/dead cells in the following generation.
Pedro Tarroso
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.