I used "dismo" package in R, and ran a build a maxent model. Now I want to extract the residuals from the model in order to run a Moran I test later. But I got an error. The code was like:
xm<-maxent(pridictors, p=sdmdata, factors="landuse")
sdmresiduals<-cbind(sdmdata,resid(xm))
And the error appearred:
Error: $ operator not defined for this S4 class
I don't understand what S4 class is. When I tried to have a look at the correlation between variables, using "car" package in R
vif(xm)
The same error happened.
How do I solve this problem?