scale_linear | R Documentation |
Linear scaling of raster cell values between a specified minimum and maximum value.
## S4 method for signature 'SpatRaster'
scale_linear(x, min=0, max=1, filename="", ...)
x |
SpatRaster |
min |
minimum value to scale to |
max |
maximum value to scale to |
filename |
character. Output filename |
... |
additional arguments for writing files as in |
SpatRaster
scale
r <- rast(system.file("ex/logo.tif", package="terra"))
s1 <- scale_linear(r)
s2 <- scale_linear(r, 1, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.