get_mask() extracts the static mask from a BirdFlow model. The
static mask is a logical raster indicating which cells are included in the
model (at any timestep). These are also the cells (in row major order)
that correspond with distribution values, and location indices.
Arguments
- bf
A BirdFlow model
- format
One of
'SpatRaster'for a terra::SpatRaster object,'numeric'for a matrix or array, or'dataframe'for raster data suitable for plotting withggplot2::geom_raster()
Value
The return type of get_mask()depends on the format argument:
"SpatRaster"(the default) returns a terra::SpatRaster object."numeric"returns the mask as a matrix."dataframe"will return a data frame suitable for plotting with ggplot2::geom_raster with columns:row,colthe row and column indices of each cell.x,ythe x and y coordinates of the cell center.ithe location index (inbf) of the cell.maskTRUEfor cells included in the model,FALSEfor excluded cells.
