Histogram — hist
Create a histogram of the values of a SpatRaster. For large datasets a sample of maxcell is used.
Usage
# S4 method for class 'SpatRaster'
hist(x, layer, maxcell=1000000, plot=TRUE, maxnl=16, main, ...)Arguments
- x
SpatRaster
- layer
positive integer or character to indicate layer numbers (or names). If missing, all layers up to
maxnlare used- maxcell
integer. To regularly sample very large objects
- plot
logical. Plot the histogram or only return the histogram values
- maxnl
positive integer. The maximum number of layers to use. Ignored if
layeris not missing- main
character. Main title(s) for the plot. Default is the value of
names- ...
additional arguments. See
hist