This function returns the unique values in a SpatRaster.
Usage
# S4 method for SpatRaster
unique(x, incomparables=FALSE, ...)
Arguments
x
SpatRaster
incomparables
logical. If TRUE, the unique values are determined for all layers together, and the result is a matrix. If FALSE, each layer is evaluated separately, and a list is returned.