crop_filter_stack: Crop a stack and remove species absent from the region

View source: R/spatial.R

crop_filter_stackR Documentation

Crop a stack and remove species absent from the region

Description

Crop a stack and remove species absent from the region

Usage

crop_filter_stack(stack, region, return_cropped = TRUE)

Arguments

stack

Species raster stack.

region

Crop region.

return_cropped

Return cropped rather than original layers.

Value

A terra::SpatRaster containing layers with nonmissing cells in the crop region. Zero values count as nonmissing; this helper expects presence/NA range rasters.


metaweave documentation built on Nov. 3, 2026, 9:06 a.m.