unique {raster} | R Documentation |
This function returns the unique values of the layers in a Raster* object.
## S4 method for signature 'RasterLayer,missing' unique(x, incomparables=FALSE, na.last=NA, progress="", ...) ## S4 method for signature 'RasterStackBrick,missing' unique(x, incomparables=FALSE, na.last=NA, progress="", ...)
x |
Raster object |
incomparables |
must be missing. The default value |
na.last |
logical. for controlling the treatment of |
progress |
character. Use "text" or "window" for a progress indicator |
... |
additional arguments. as in |
vector or matrix
r <- raster(ncol=10, nrow=10) r[] <- round(runif(ncell(r))*10) unique(r) unique(stack(r, round(r/2)))