randomPolygons(ras = raster(extent(0, 15, 0, 15), res = 1), p = 0.1,
A = 0.3, speedup = 1, numTypes = 1, minpatch = 2, ...)
length(A)
unique levels.ras
.p
, A
or
minpatch
, if any of these are vectors.length(A)
unique levels.randomHabitat
.ext
with random polygons.randomHabitat
function in the
secr
package.
The two main additions are the speedup
argument which allows for
faster map generation for large rasters and addition of multiple unique
polygon values, using code drawn from
randomHabitat
and raster
r1 <- randomPolygons(p=c(0.1, 0.3, 0.5), A=0.3)
Plot(r1, cols=c("white","dark green","blue","dark red"), new=TRUE)
Run the code above in your browser using DataLab