stats: Get a short summary of a given raster segment.
Description
Return a set of descriptive statistics of the given layer,
either a specific one (minimum, q1, median, q3, maximum,
median absolute deviation (mad), mean, standard deviation (sd)) or all of them.
Usage
stats(layer, plot = FALSE)
Value
data.frame. If plot is TRUE, also outputs a histogram of the layer.
Arguments
layer
SpatRaster. Raster object, as defined by package terra, with a single layer.
plot
logical. If TRUE, a histogram of raster values is drawn.