I have been using R code to predict the future distribution of small mammal species based on records of their occurrence in the Atlantic Forest and predictions of environmental variables. I used this code just fine throughout last year:
maxent <- BIOMOD_Modeling(bm.format=PA_data,
models=c("MAXENT"),
bm.options = max_params,
nb.rep=50,
prevalence = 0.5,
data.split.perc=70,
var.import=0,
metric.eval=c("TSS","ROC"),
save.output=TRUE,
scale.models=TRUE,
do.full.models=FALSE,
modeling.id=paste(sp))
But now it gives the following error after starting to run Maxent through the BIOMOD_Modeling function:
-=-=-=-=-=-=-=-=-=-=-=-=-=-= Build Single Models -=-=-=-=-=-=-=-=-=-=-=-=-=-=
Checking Models arguments...
MAXENT default prevalence option was updated to fit with modeling prevalence (i.e 0.5 )
Creating suitable Workdir...
! Weights where automatically defined for Caluromys.philander_PA1 to rise a 0.5 prevalence !
-=-=-=-=-=-=-=-=-=-= Caluromys.philander Modeling Summary -=-=-=-=-=-=-=-=-=-=
8 environmental variables ( bio_12 bio_13 bio_18 bio_19 bio_2 bio_4 bio_8 bio_9 )
Number of evaluation repetitions : 50
Models selected : MAXENT
Total number of model runs: 50
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=-=-=- Run : Caluromys.philander_PA1
-=-=-=--=-=-=- Caluromys.philander_PA1_RUN1
Error in summary.connection(connection) : invalid connection
I already tried updating R and all of my R packages, but nothing worked, and the rest of the code seems fine. What could be the problem?