This function assigns random connected regions on a square. Used within function RandomRegionWindow
.
Usage
connectUp(r, nRegion, seed = NULL)
Arguments
- r
poly is a RasterLayer (e.g. 20 by 20 square).
- nRegion
nRegion is the No. of regions (e.g. nRegion=3)
- seed
Random seed.
Value
A list of the selected polygons for each region.