Adds a boundary constraint to a scenario object
Source:R/add_constraint.R
add_constraint_boundary.Rd
The purpose of boundary constraints is to limit a future projection within a specified area (such as for example a range or ecoregion). This can help to limit unreasonable projections into geographic space.
Similar to boundary constraints it is also possible to define a "zone"
for the scenario projections, similar as was done for model training. The
difference to a boundary constraint is that the boundary constraint is
applied posthoc as a hard cut on any projection, while the zones would allow
any projection (and other constraints) to be applied within the zone.
Note: Setting a boundary constraint for future projections effectively potentially suitable areas!
Usage
# S4 method for BiodiversityScenario,sf,character
add_constraint_boundary(mod,layer,method)
# S4 method for BiodiversityScenario,ANY,character
add_constraint_boundary(mod,layer,method)
Arguments
- mod
A
BiodiversityScenario
object with specified predictors.- layer
A
SpatRaster
orsf
object with the same extent as the model background. Has to be binary and is used for a posthoc masking of projected grid cells.- method
A
character
indicating the type of constraints to be added to the scenario. See details for more information.- ...
passed on parameters. See also the specific methods for adding constraints.
See also
Other constraint:
add_constraint_adaptability()
,
add_constraint_connectivity()
,
add_constraint_dispersal()
,
add_constraint_minsize()
,
add_constraint()
Examples
if (FALSE) {
# Add scenario constraint
scenario(fit) |> add_constraint_boundary(range)
}