simpatches: simpatches

Description Usage Arguments Value

View source: R/landscape.R

Description

Function to simulate a patchy habitat matrix by "growing" one habitat type from a cellular automota-like loop.

Usage

1
simpatches(matsize, count.max = 200, n.clusters, size.clusters)

Arguments

matsize

integer, the size of a side of the suare matrix to be created.

count.max

interger, the maximum number of iterations throught the while-loop. Default value is 200

n.clusters

integer, the number of indpendent habitat patches of "type A" to grow.

size.clusters

integer, the target average size (in number of matrix cells) for each patch.

Value

Returns a matrix of size 'matsize' x 'matsize' containing approximately 'n.clusters' patches of approximately 'size.clusters' size.


syanco/checkyourself documentation built on Jan. 18, 2021, 4:50 a.m.