powered by
Compute summary statistics (min, max, mean, and quartiles) for SpatRaster using base summary method. A sample is used for very large files.
summary
For single or other statistics see Summary-methods, global, and quantile
Summary-methods
global
quantile
# S4 method for SpatRaster summary(object, size=100000, warn=TRUE, ...)# S4 method for SpatVector summary(object, ...)
# S4 method for SpatVector summary(object, ...)
matrix with (an estimate of) the median, minimum and maximum values, the first and third quartiles, and the number of cells with NA values
NA
SpatRaster or SpatVector
positive integer. Size of a regular sample used for large datasets (see spatSample)
spatSample
logical. If TRUE a warning is given if a sample is used
TRUE
additional arguments passed on to the base summary method
summary method
Summary-methods, global, quantile
set.seed(0) r <- rast(nrows=10, ncols=10, nlyrs=3) values(r) <- runif(nlyr(r)*ncell(r)) summary(r)
Run the code above in your browser using DataLab