i was doing SDM using MaxEnt in R but i couldnt run jackknife test
# add uae shapefile`
uae = readOGR(dsn ="C:/Users/Predator/Downloads", layer="Boundaries_UAE_0_GAUL")
pj = gbif("Prosopis", "juliflora", ext=uae ,geo=T) #with geographic points only and sp as dat frame
pj=pj[,c("lon","lat")] # add lat lon
biow=raster::getData("worldclim",var="bio",res=2.5) #get world clim data
#crop the data to the uae
bio<-crop(biow,extent(uae))
#download future data for CMIP5 in 50 years
biof=raster::getData("CMIP5",var="bio",res=2.5,rcp=45,year=50,model="AC" ,download = TRUE)
# croping biof to the area
biof<-crop(biof,extent(uae))
names(biof) = names(bio)
# Kfold to 5 groups
group=kfold(pj,5)
pres_train= pj[group!=1,]
pres_test= pj[group==1,]
#train the model
xm = maxent(bio, pres_train, jackknife=TRUE)
using jackknife=TRUE doesnt work and trying
enm_eval <- ENMevaluate( algorithm = "maxent", xm, bio, pres_test, bg )`
then i get
Error in as.data.frame.default(occs) : cannot coerce class ‘structure("MaxEnt", package = "dismo")’ to a data.frame