Generates a random set of species using random field models. By default, the output will contain values between zero and one.

simulate_species(x, n = 1, model = RandomFields::RMgauss(),
  transform = stats::plogis, ...)

Arguments

x

RasterLayer-class object to use as

n

integer number of species to simulate.

model

RP model object to use for simulating data.

transform

function to transform values output from the random fields simulation.

...

additional arguments passed to RFsimulate.

Value

RasterStack-class object.

See also

Examples

# create raster r <- raster(ncol=10, nrow=10, xmn=0, xmx=1, ymn=0, ymx=1) values(r) <- 1 # simulate 4 species spp <- simulate_species(r, 4)
#> ....
# plot simulated species plot(spp, main = "simulated species distributions")