summary: summary

Description Usage Arguments Value See Also Examples

Description

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

Usage

1
2
3
4
5
## S4 method for signature 'SpatRaster'
summary(object, size=100000, warn=TRUE, ...)

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

Arguments

object

SpatRaster or SpatVector

size

positive integer. Size of a regular sample used for large datasets (see spatSample)

warn

logical. If TRUE a warning is given if a sample is used

...

additional arguments passed on to the base summary method

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

global, quantile

Examples

1
2
3
4
set.seed(0)
r <- rast(nrows=10, ncols=10, nlyrs=3)
values(r) <- runif(nlyr(r)*ncell(r))
summary(r)

terra documentation built on Aug. 20, 2021, 9:07 a.m.