When running the MOP analysis I get the following error:
Error in if (class(M1) == "RasterBrick" | class(M1) == "RasterStack" | :
the condition has length > 1
Using the following code
##############################################################
library(kuenm)
library(raster)
setwd("D:/Forest and Nature Conservation - Jaar 1/WEC/Maxent/G_variables/Set_78/Future")
list <- list.files(pattern="\.asc")
setwd("D:/Forest and Nature Conservation - Jaar 1/WEC/Maxent/M_variables/Set_78/")
listm<- list.files(pattern="\.asc")
When running the MOP analysis I get the following error: Error in if (class(M1) == "RasterBrick" | class(M1) == "RasterStack" | : the condition has length > 1
Using the following code ############################################################## library(kuenm) library(raster)
setwd("D:/Forest and Nature Conservation - Jaar 1/WEC/Maxent/G_variables/Set_78/Future") list <- list.files(pattern="\.asc") setwd("D:/Forest and Nature Conservation - Jaar 1/WEC/Maxent/M_variables/Set_78/") listm<- list.files(pattern="\.asc")
G.stack <- stack(list) M.stack <- stack(listm)
kuenm_mop(M.stack, G.stack, percent = 10, comp.each = 2000, parallel = FALSE, n.cores = NULL) #################################################################
Both rasterstacks are Identical (besides one is future prediction...)
I've been searching for a fix but nothing seems to work, any ideas?