From a4929db12216adfe4a41c95d9e1a3fcdee3847bb Mon Sep 17 00:00:00 2001 From: Stefan Pinkert Date: Wed, 13 Nov 2024 13:51:18 +0100 Subject: [PATCH] Update evaluateRM.R resolved issue with thresholding --- R/evaluateRM.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/evaluateRM.R b/R/evaluateRM.R index e485999..d2599bb 100644 --- a/R/evaluateRM.R +++ b/R/evaluateRM.R @@ -181,7 +181,7 @@ evaluateRM <- function(root.dir = NULL, # Reclassify validation raster if (all(range(terra::values(valRM), na.rm = TRUE) == c(0, 1))) { - valRM_pres <- terra::classify(valRM, cbind(c(0, 0.5, 0.5, 1), c(0, 0, 1, 1))) + valRM_pres <- terra::classify(valRM, rbind(c(0, 0.5, 0), c(0.5, 1, 1)), include.lowest = TRUE) } else { valRM_pres <- valRM valRM_pres[!is.na(domain_raster[])] <- 0