scale | R Documentation |
Center and/or scale raster data. For details see scale
## S4 method for signature 'SpatRaster'
scale(x, center=TRUE, scale=TRUE)
x |
SpatRaster |
center |
logical or numeric. If |
scale |
logical or numeric. If |
SpatRaster
scale
r <- rast(system.file("ex/logo.tif", package="terra"))
s <- scale(r)
## the equivalent, computed in steps
m <- global(r, "mean")
rr <- r - m[,1]
rms <- global(rr, "rms")
ss <- rr / rms[,1]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.