Generates simulated cost data using Gaussian random fields. Specifically, it returns spatially auto-correlated data with integer values.

simulate_cost(x, n = 1, intensity = 100, sd = 20, scale = 2.5)

Arguments

x

raster::raster() raster object to use as a template.

n

integer number of layers to simulate. Defaults to 1.

intensity

numeric average value of simulated data. Defaults to 100.

sd

numeric standard deviation of simulated data. Defaults to 20.

scale

numeric strength of spatial auto-correlation. Defaults to 2.5.

Value

RasterStack object.

See also

Examples

# \dontrun{
# create raster
r <- raster(ncol = 10, nrow = 10, xmn = 0, xmx = 1, ymn = 0, ymx = 1)
values(r) <- 1

# simulate data
cost <- simulate_cost(r)

# plot simulated species
plot(cost, main = "simulated cost data")

# }