unique

0th

Percentile

Unique values

This function returns the unique values in a RasterLayer, or the unique combinations of values in a multi-layer raster object.

Keywords
spatial
Usage
# S4 method for RasterLayer,missing
unique(x, incomparables=FALSE, ...) 

# S4 method for RasterStackBrick,missing unique(x, incomparables=FALSE, ...)

Arguments
x

Raster object

incomparables

ignored. Must be missing

...

additional arguments. One implemented: progress, as in writeRaster

Value

vector or matrix

See Also

unique

Aliases
  • unique
  • unique,RasterLayer,missing-method
  • unique,RasterStackBrick,missing-method
Examples
# NOT RUN {
r <- raster(ncol=10, nrow=10)
r[] <- round(runif(ncell(r))*10)
unique(r)
unique(stack(r, round(r/2)))
# }
Documentation reproduced from package raster, version 2.7-15, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.