sim.space {raptr} | R Documentation |
Simulate attribute space data for RAP
Description
This function simulates attribute space data for RAP.
Usage
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, ...)
Arguments
x |
|
... |
not used. |
d |
|
model |
|
res |
|
Value
terra::rast()
with layers for each dimension of the space.
Examples
## 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)
[Package raptr version 1.0.1 Index]