Maxent variable selection error

27 views
Skip to first unread message

Wondessen Ayalew

unread,
Jan 15, 2025, 5:51:49 PMJan 15
to Maxent

Hi folks,

I am using Maxent in R to model species distribution for Ethiopian sheep. I am new for ENM analysis. Now, I encountered the following error during the VariableSelection() step:

Error in system(command, as.integer(flag), f, stdout, stderr, timeout,  :

 character string expected as first argument

Here’s my setup:

Operating System: Windows 10

Maxent Version: 3.4.1

R Version: 4.3.1

Java Version: 1.8.0_291

Relevant Packages: dismo

My R script:

 

maxent <- "D:/ENM_Analysis/maxent/maxent/maxent.jar"

gridfolder <- dir(path="D:/ENM_Analysis/maxent/maxent", pattern='asc', full.names=TRUE)

outdir <- "D:/ENM_Analysis/maxent/maxent/outdir"

occurrencelocations <- "D:/ENM_Analysis/maxent/maxent/VariablesAtOccurrencelocations.csv"

backgroundlocations <- "D:/ENM_Analysis/maxent/maxent/VariablesAtBackgroundlocations.csv"

additionalargs <- "nolinear noquadratic noproduct nothreshold noautofeature"

betamultiplier <- seq(0.5, 15, 0.2)

 

VariableSelection(

  maxent,

  outdir,

  gridfolder,

  occurrencelocations,

  backgroundlocations,

  additionalargs,

  contributionthreshold = 5,

  correlationthreshold = 0.9,

  betamultiplier

)

I’ve verified the paths and that the .asc files exist in the maxent/maxent folder. What might be causing this error, and how can I resolve it?

 

Thanks in advance for your help!

 

Best regards,

Wondossen

 

 

 


Reply all
Reply to author
Forward
0 new messages