从 R 中的“biomod2”中运行 MaxEnt 时出错

问题描述 投票:0回答:1

我正在尝试使用 R 中的

biomod2
包来拟合一些物种分布模型。

我已经编译了所有必需的数据,以便

biomod2
使用除 MaxEnt 之外的所有技术成功拟合模型,这会引发错误:

Error in file(file, "rt") : cannot open the connection
In addition: Warning messages:
1: running command 'java -mx512m -jar C:/Users/ajb273/inSync Share/PhD/Data/SDMs R/maxent.jar environmentallayers="Bushcrow/models/BushcrowFirstModeling/m_38411293/Back_swd.csv" samplesfile="Bushcrow/models/BushcrowFirstModeling/m_38411293/Sp_swd.csv" projectionlayers="Bushcrow/models/BushcrowFirstModeling/m_38411293/Predictions/Pred_swd.csv" outputdirectory="Bushcrow/models/BushcrowFirstModeling/Bushcrow_PA1_RUN10_MAXENT_outputs" outputformat=logistic  redoifexists visible=FALSE linear=TRUE quadratic=TRUE product=TRUE threshold=TRUE hinge=TRUE lq2lqptthreshold=80 l2lqthreshold=10 hingethreshold=15 beta_threshold=-1 beta_categorical=-1 beta_lqp=-1 beta_hinge=-1 defaultprevalence=0.5 autorun nowarnings notooltips noaddsamplestobackground' had status 1 
2: In file(file, "rt") :
   cannot open file 'Bushcrow/models/BushcrowFirstModeling/Bushcrow_PA1_RUN10_MAXENT_outputs/Bushcrow_PA1_RUN10_Pred_swd.csv': No such file or directory

我认为这可能是因为

biomod2
无法找到 MaxEnt 或 Java,但我加载了
rJava
包,并尝试在同一个 R 会话中在
dismo
包中运行 MaxEnt,并且它运行良好。

有人知道会发生什么吗?

谢谢, 安德鲁

r rjava maxent biomod2
1个回答
2
投票

为了让任何感兴趣的用户知道,我终于解决了这个问题。似乎

MaxEnt
中的
biomod2
不会接受
maxent.jar
文件的文件路径中的空格,至少在某些时候是这样。我将文件移动到另一个没有空格的目录,它现在可以运行。

© www.soinside.com 2019 - 2024. All rights reserved.