Skip to contents

This is a helper function that takes an existing object created by the ibis.iSDM package and an external layer, then intersects both. It currently takes either a DistributionModel, BiodiversityDatasetCollection, PredictorDataset or BiodiversityScenario as input.

As mask either a sf or SpatRaster object can be chosen. The mask will be converted internally depending on the object.

Usage

mask.DistributionModel(x, mask, inverse = FALSE, ...)

mask.BiodiversityDatasetCollection(x, mask, inverse = FALSE, ...)

mask.PredictorDataset(x, mask, inverse = FALSE, ...)

mask.BiodiversityScenario(x, mask, inverse = FALSE, ...)

Arguments

x

Any object belonging to DistributionModel, BiodiversityDatasetCollection, PredictorDataset or BiodiversityScenario.

mask

A sf or SpatRaster object.

inverse

A logical flag whether to take inverse of the mask instead (Default: FALSE).

...

Passed on arguments

Value

A respective object of the input type.

See also

Examples

if (FALSE) {
# Build and train a model
mod <- distribution(background) |>
  add_biodiversity_poipo(species) |>
  add_predictors(predictors) |>
  engine_glmnet() |>
  train()

# Constrain the prediction by another object
mod <- mask(mod, speciesrange)

}