使用:
glmmadmb()
通话错误:
Error in system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait, : 'C:/Program' not found"
提示我按照没有相关空格的路径重新安装R,如本帖子中所建议的那样,该错误Rcpp
涉及()。我这样做了,错误仍然存在。
在标准/默认R安装(带空格的路径名)下,代码在Rstudio中运行时没有错误。尝试拟合时,我的问题发生在EMACS / ESS / R 3.1.1上glmmadmb()
,这提示我使用debug=TRUE
> gaFP0<-glmmadmb(count~tx,
random=~(1|Feed)+(1 | Pint),
data=dnoNM,family="nbinom",zeroInflation=TRUE,
debug=TRUE)
哪个输出:
platform: windows 64
executable name: glmmadmb.exe
bin_loc: C:/RLIB/glmmADMB/bin/windows64/glmmadmb.exe
using temp directory
C:\Users\user1\AppData\Local\Temp\Rtmpq2AddG\glmmADMB90e434c55ff2
creating temp directory changed working directory to
C:/Users/user1/AppData/Local/Temp/Rtmpq2AddG/glmmADMB90e434c55ff2
Command line: "C:/RLIB/glmmADMB/bin/windows64/glmmadmb.exe" -maxfn 500 -maxph 5 -noinit -shess
Error in system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait, :
'C:/Program' not found
changed working directory to h:/
removed temp directory
C:\Users\user1\AppData\Local\Temp\Rtmpq2AddG\glmmADMB90e434c55ff2
注意-我也重新安装了Emacs,以使路径名中没有空格,但仍然出现错误,尽管我没有卸载原始版本。
为了使EMACS / ESS可以运行代码,我使用了该技巧,Sys.setenv()
然后在函数调用之前执行以下语句。
> Sys.setenv(R_SHELL = "C:\\Windows\\system32\\cmd.exe")
> gaFP0<-glmmadmb(count~tx,
random=~(1|Feed)+(1 | Pint),
data=dnoNM,family="nbinom",zeroInflation=TRUE,
debug=TRUE)
现在glmmadmb()
按预期运行。请参阅Ross Boylan解释的原因(此Q&A stackoverflow帖子是在他的允许下写的)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句