2017-08-01 163 views
0

我是一个试图在Windows上运行BRugs的Mac OS用户(BRugs不是available for Mac)。但是我无法安装BRugs软件包。例如:错误:包或命名空间加载失败的BRugs

> library(BRugs) 

Error : .onLoad failed in loadNamespace() for 'BRugs', details: 
call: if (!is.na(ob$version)) msg <- paste(msg, "version", ob$version) else msg <- paste(msg, 
error: argument is of length zero 
In addition: Warning messages: 
1: package ‘BRugs’ was built under R version 3.3.3 
2: In findOpenBUGS() : OpenBUGS 3.2.2 or greater must be installed 
(if so, this indicates missing registry keys of OpenBUGS). 
Setting the environment variable 'OpenBUGS_PATH' in advance of loading 'BRugs' overwrites the path. 
See ?loadOpenBUGS in order to load OpenBUGS manually. 
3: In is.na(ob$version) : 
    is.na() applied to non-(list or vector) of type 'NULL' 
Error: package or namespace load failed for ‘BRugs’ 

我也试着重新安装BRugs,但错误依然存在:

> remove.packages("BRugs") 
> install.packages("BRugs", dependencies=TRUE) 

任何建议,将不胜感激。

+0

消息说,你需要先安装Openbugs'在findOpenBUGS():OpenBUGS 3.2.2或更高版本必须是installed'第一 –

回答

0

我在一本书中读到“如果你使用的是MacOS,你需要在WINE中运行R的Windows版本”。 然后转到以下网站,并有关于软件包的更多说明。 http://www.openbugs.net/w/Downloads

+0

你能澄清请,为什么它需要'WINE'? – Sergii