sylvainschmitt / SSDM

Stacked Species Distribution Modelling R package
Other
41 stars 17 forks source link

Model axes contribution evaluation: Error in if (stat != "") { : argument is of length zero #118

Open henriqueantoniolli opened 2 years ago

henriqueantoniolli commented 2 years ago

Dear Sylvain and contributors,

I am getting the error at the "Model axes contribution evaluation" step for all algorithms, except MAXENT. Here I bring an example for the first algorithm (GLM):

library(SSDM)
library(raster)
Environ <- load_var(path="layers/",files=NULL,format=".tif")
Occur <- load_occ(path="occur/",Environ,Xcol='lon',Ycol='lat',sep=",",dec=".",Spcol='sp')
SSDM <- ensemble_modelling(algorithms = "all",Occurrences = Occur,Env = Environ,
                                  Xcol='lon', Ycol='lat', Pcol=NULL,
                                  rep=1, tmp=T, cv="holdout",
                                  PA=NULL, cv.param = c(0.75, 10), axes.metric = "AUC",
                                  ensemble.metric = c("AUC"), ensemble.thresh = c(0.75))

Algorithms models creation for species ##### 2022-01-19 16:55:40

Modelling : GLM.1

Data check ... No presence column, presence-only data set is supposed. Pseudo-absence selection will be computed. done.

Pseudo absence selection... random selection done.

Model evaluation... done.

Model projection... done.

Model axes contribution evaluation... Error in if (stat != "") { : argument is of length zero Error in if (stat != "") { : argument is of length zero GLM.1 done for species 2022-01-19 16:55:44

I was not able to find help on this matter elsewhere. I am running the Github version of SSDM (0.2.8.9002), on R version 4.0.0, Ubuntu 20.04.3 LTS.

Thanks Henrique Antoniolli

sylvainschmitt commented 5 months ago

Could you make a reproducible example with the package data?