Learn R Programming

BoundaryStats (version 2.3.0)

categorical_boundary: Define the boundary elements of a SpatRaster with categorical data

Description

This function is deprecated. Please use define_boundary

Creates boundary element cells where patches of two categories meet.

Usage

categorical_boundary(x)

Value

A SpatRaster object with cell values 1 for boundary elements and 0 for other cells

Arguments

x

A SpatRaster object.

Author

Amy Luo

Examples

Run this code
# \donttest{
data(grassland)
grassland <- terra::rast(grassland_matrix, crs = grassland_crs)
terra::ext(grassland) <- grassland_ext

grassland_boundaries <- categorical_boundary(grassland)
# }

Run the code above in your browser using DataLab