simulate_species {prioritizr} | R Documentation |
Simulate species habitat suitability data
Description
Generates simulated species data using Gaussian random fields.
Usage
simulate_species(x, n, scale)
## S3 method for class 'Raster'
simulate_species(x, n = 1, scale = 0.5)
## S3 method for class 'SpatRaster'
simulate_species(x, n = 1, scale = 0.5)
Arguments
x |
|
n |
|
scale |
|
Value
A terra::rast()
object with values between zero and one.
See Also
Other simulations:
simulate_cost()
,
simulate_data()
Examples
## Not run:
# create raster
r <- terra::rast(
ncols = 10, nrows = 10, xmin = 0, xmax = 1, ymin = 0, ymax = 1, vals = 1
)
# simulate data for 4 species
spp <- simulate_species(r, 4)
# plot simulated species
plot(spp, main = "simulated species distributions", axes = FALSE)
## End(Not run)
[Package prioritizr version 8.0.4 Index]