raster (version 1.0.4)

unique: Unique values

Description

This function returns the unique values in a RasterLayer

Usage

unique(x, incomparables=FALSE, ...)

Arguments

x
A RasterLayer object
incomparables
Ignored. Must be missing
...
Ignored. Must be missing

Value

  • a vector

See Also

unique

Examples

Run this code
r <- raster(ncol=10, nrow=10)
r[] <- round(runif(ncell(r))*10)
unique(r)

Run the code above in your browser using DataCamp Workspace