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