simulate_species | R Documentation |
Generates simulated species data using Gaussian random fields.
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)
x |
|
n |
|
scale |
|
A terra::rast()
object with values between zero and one.
Other simulations:
simulate_cost()
,
simulate_data()
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.