我嘗試加載rjags時收到一些錯誤。我使用標準的install.packages(「rjags」),這似乎很好。但是當我加載包時,它不起作用。這是我得到:在Mac上安裝rjags Elitan capitan 10.11.4
> library(rjags)
Loading required package: coda
Error : .onLoad failed in loadNamespace() for 'rjags', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/rjags.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/r jags.so, 10): Library not loaded: /usr/local/lib/libjags.3.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/rjags.so
Reason: image not found
In addition: Warning messages:
1: package ‘rjags’ was built under R version 3.1.3
2: package ‘coda’ was built under R version 3.1.3
Error: package or namespace load failed for ‘rjags’
>
有什麼建議嗎?
我用「R版本3.1.2(2014年10月31日)」,「南瓜頭盔」
如果你真的鍵入'install.packages(「Rjags」)',那麼這就是你的問題。試試'install.packages(「rjags」)'。否則,嘗試使用'remove.packages()'卸載軟件包並重新安裝? –
這是一個錯字,我會編輯。 – TKN