Learn R Programming

terra (version 1.8-86)

summary: summary

Description

Compute summary statistics (min, max, mean, and quartiles) for SpatRaster using base summary method. A sample is used for very large files.

For single or other statistics see Summary-methods, global, and quantile

Usage

# S4 method for SpatRaster
summary(object, size=100000, warn=TRUE, ...)

# S4 method for SpatVector summary(object, ...)

Arguments

Value

matrix with (an estimate of) the median, minimum and maximum values, the first and third quartiles, and the number of cells with NA values

See Also

Summary-methods, global, quantile

Examples

Run this code
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