Skip to content

Commit

Permalink
Update evaluateRM.R
Browse files Browse the repository at this point in the history
resolved issue with thresholding
  • Loading branch information
PinkertS authored Nov 13, 2024
1 parent aeddd34 commit a4929db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/evaluateRM.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a4929db

Please sign in to comment.