Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

Usage

## 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

Examples

set.seed(0)
r <- rast(nrow=10, ncol=10, nlyr=3)
values(r) <- runif(nlyr(r)*ncell(r))
summary(r)

terra

Spatial Data Analysis

v1.2-10
GPL (>= 3)
Authors
Robert J. Hijmans [cre, aut] (<https://orcid.org/0000-0001-5872-2872>), Roger Bivand [ctb] (<https://orcid.org/0000-0003-2392-6140>), Karl Forner [ctb], Jeroen Ooms [ctb] (<https://orcid.org/0000-0002-4035-0289>), Edzer Pebesma [ctb] (<https://orcid.org/0000-0001-8049-7069>)
Initial release
2021-05-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.