sim.space | R Documentation |
This function simulates attribute space data for RAP.
sim.space(x, ...)
## S3 method for class 'SpatRaster'
sim.space(x, d = 2, model = 0.2, ...)
## S3 method for class 'SpatialPolygons'
sim.space(x, res, d = 2, model = 0.2, ...)
## S3 method for class 'sf'
sim.space(x, res, d = 2, model = 0.2, ...)
x |
|
... |
not used. |
d |
|
model |
|
res |
|
terra::rast()
with layers for each dimension of the space.
## Not run:
# simulate planning units
sim_pus <- sim.pus(225L)
# simulate 1d space using SpatRaster
s1 <- sim.space(blank.raster(sim_pus, 1), d = 1)
# simulate 1d space using sf
s2 <- sim.space(sim_pus, res = 1, d = 1)
# simulate 2d space using sf
s3 <- sim.space(sim_pus, res = 1, d = 2)
# plot simulated spaces
par(mfrow = c(2,2))
plot(s1, main = "s1")
plot(s2, main = "s2")
plot(s3[[1]], main = "s3: first dimension")
plot(s3[[2]], main = "s3: second dimension")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.