Hi I am trying to run ENMeval on occurrence data and some rasters to determine settings for MaxEnt modelling. Whenever I try to run some of my code containing the raster layers, ie:
#resample layer
Elevation_resample <- resample(Elevation, FC, method = "bilinear")
Error in if (getOption("scipen") <= min(digits)) { :
missing value where TRUE/FALSE neededtype here
#reclassify layer
FC_rc <- reclassify(FC, matrix(c(NA, 0), ncol = 2))
Error in if (getOption("scipen") <= min(digits)) { :
missing value where TRUE/FALSE needed
#reclassify layer
Elevation_rc <- reclassify(Elevation, cbind(NA, 0))
Error in if (getOption("scipen") <= min(digits)) { :
missing value where TRUE/FALSE needed
#look for NA values in the raster
na_cells <- is.na(Elevation)
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'filename' in selecting a method for function 'writeStart': missing value where TRUE/FALSE needed
I get the same error code coming up (this also comes up when I run ENMevaluate.
Any help with how I can get around this would be massively appreciated. I assumed it was something to do with having NA values but when I try to replace them with zero values that also gives the same message (see above)?
I have tried to turn the NA values in my raster datasets to 0 values but that does not seem to work. I have tried to restart and look for any packages I might be missing but also have no luck. At the moment I am stuck on the code above.