Scale values linearly
scale_linear.Rd
Linear scaling of raster cell values between a specified minimum and maximum value.
Arguments
- 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
writeRaster
Examples
r <- rast(system.file("ex/logo.tif", package="terra"))
s1 <- scale_linear(r)
s2 <- scale_linear(r, 1, 10)