stats {gecko} | R Documentation |
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)
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. |
Value
data.frame. If plot is TRUE, also outputs a histogram of the layer.
Examples
region = gecko.data("layers")
stats(region[[1]])
[Package gecko version 1.0.0 Index]