Skip to content

Commit

Permalink
Update evaluateRM.R
Browse files Browse the repository at this point in the history
debugging "valData.type"
  • Loading branch information
PinkertS authored Nov 13, 2024
1 parent 24b015a commit aeddd34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/evaluateRM.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ evaluateRM <- function(root.dir = NULL,
recursive = TRUE
)
f.list_valRM <- sub("\\.tif$", "", basename(f.list_valRM_full))
valData.type = "TIFF"
}

# Check and report match of file names
Expand Down Expand Up @@ -124,7 +125,7 @@ evaluateRM <- function(root.dir = NULL,
ecoRM <- terra::rast(f_list_eco_full[grep(f.list_matches[i], f_list_eco_full)])

# Load validation data
if (valData.type == "TIF") {
if (valData.type == "TIFF") {
valRM <- terra::rast(f.list_valRM_full[grep(f.list_matches[i], f.list_valRM_full)])
suppressWarnings({
if (is.na(any(all.equal(terra::crs(ecoRM), terra::crs(valRM))))) {valRM <- terra::project(valRM, ecoRM)}
Expand Down

0 comments on commit aeddd34

Please sign in to comment.