TransWikia.com

MaxEnt in RStudio ENMeval Error

Geographic Information Systems Asked on May 22, 2021

I am trying to run a MaxEnt in ENMeval to select the best performing model with differing regularization multipliers and feature combinations.

I am not that strong in RStudio but have been advised that this is the best approach I have been following an online tutorial but have come across an error in my code:

sp_df <- read.csv(file = "Season1.csv", header = T);

sp_df <- cbind(sp_df, rep.int(1, length(nrow(sp_df)))); #Adds another column indicating these are presence points

colnames(sp_df) <- c("Species", "X", "Y", "Response");


#Get environmental variables

preds <- list.files(pattern = ".asc");

preds <- stack(preds);

eval = ENMevaluate(occ=sp_df[,c('X', 'Y')], env = preds, method= 'randomkfold',

kfolds=10, parallel=TRUE, numCores = 12, fc=c("L", "Q", "LQ"), RMvalues=seq(0.5, 2, 0.5), rasterPreds=T)

*** Running ENMevaluate using maxnet v.0.1.2 
*** Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘nlayers’ for signature ‘"character"’

How can I fix this error? I’m confused as I don’t understand the language in this error or what it is referring to?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP