mask_by_range: Mask a raster

View source: R/create_analysis_region.R

mask_by_rangeR Documentation

Mask a raster

Description

Create a raster mask based on an allowable range of values

Usage

mask_by_range(raster, range_mx)

Arguments

raster

A SpatRaster

range_mx

A matrix with one row for each layer of the raster to use when calculating mask, and a column each for "min" and "max", indicating min and max allowable values. Rownames must match layer names in raster.

Value

A SpatRaster mask: Values are NA where values fall outside the range and 1 where values fall within the range.


tabrasel/WetlandTools documentation built on Dec. 20, 2024, 8:50 a.m.