SpatRaster local quantiles
Compute quantiles for each cell across the layers of a SpatRaster
## S4 method for signature 'SpatRaster' quantile(x, probs=seq(0, 1, 0.25), na.rm=FALSE, filename="", ...)
x |
SpatRaster |
probs |
numeric vector of probabilities with values in [0,1] |
na.rm |
logical. If |
filename |
character. Output filename |
... |
additional arguments for writing files as in |
SpatRaster with layers representing quantiles
r <- rast(system.file("ex/logo.tif", package="terra")) r <- c(r/2, r, r*2) q <- quantile(r) q # same but slower # qa <- app(r, quantile)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.