rescale0to1 {climateStability} | R Documentation |
Rescale raster from 0 to 1
Description
A function to rescale a raster from 0 to 1. This is done using the formula (value-min)/(max-min).
Usage
rescale0to1(rasterForCalculation)
Arguments
rasterForCalculation |
A 'SpatRaster' that contains data to be rescaled |
Value
A raster that has been rescaled from 0 to 1
References
Owens, H.L., Guralnick, R., 2019. climateStability: An R package to estimate climate stability from time-slice climatologies. Biodiversity Informatics 14, 8–13. https://doi.org/10.17161/bi.v14i0.9786
Examples
precipDeviation <- terra::rast(system.file("extdata/precipDeviation.asc",
package = "climateStability"))
precipStability <- 1/precipDeviation
relativeClimateStability <- rescale0to1(precipStability)
[Package climateStability version 0.1.4 Index]