'How to compute Akaike Information Criterion for Maxent in r

I am using the Maxent entropy method for disease distribution. I ran the model using R. While trying to test the model with AIC, I am getting the following error:

Error in class(model@model) %in% c("Maxent", "Maxnet") : no slot of name "model" for this object of class "MaxEnt"

This is the code I used:

aicc(asf1.me,modelEnv) 

Please, can someone help me to fix that error? Thank you.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source