scaling {TOC} | R Documentation |
scale the output TOC values and change units
Description
scale the 'Hits' and 'Hits+FalseAlarms' values in the TOC output table, as well as the prevalence and population, using a scaling factor. Labels for the modified units in the TOC object are changed to newUnits
Usage
## S4 method for signature 'Toc'
scaling(x, scalingFactor, newUnits)
Arguments
x |
an object of class Toc |
scalingFactor |
numeric value to scale 'Hits' and 'Hits+FalseAlarms' values in the TOC output table, as well as the prevalence and population |
newUnits |
charater string for the new data units in the TOC object |
Value
an object of class TOC
See Also
Examples
index <- rast(system.file("external/Prob_Map2.rst", package = "TOC"))
boolean <- rast(system.file("external/Change_Map2b.rst", package = "TOC"))
mask <- rast(system.file("external/MASK4.rst", package = "TOC"))
tocd <- TOC(index, boolean, mask, nthres = 100)
plot(tocd)
## scale units from square m to square km
tocd_sqkm <- scaling(tocd, scalingFactor = 1000000, newUnits = "square km")
plot(tocd_sqkm)
[Package TOC version 0.0-6 Index]