我有問題獲取R包的R包調用JAGS(Just Another Gibbs Sampler http://www-ice.iarc.fr/~martyn/software/jags/)。在Mac上安裝rjags和JAGS時出現的問題OsX 10.5.8
我正在運行Mac OS X. 10.5.8 Leopard並使用R64 2.12.1。我從命令行編譯JAGS。然後我在R命令行中安裝了rjags。
install.packages(rjags)
當我嘗試在R中調用rjags時,出現以下錯誤。
> library(rjags)
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/2.12/Resources /library/rjags/libs/x86_64/rjags.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.12/Resources/library/rjags/libs/x86_64/rjags.so, 10): Library not loaded: /usr/local/lib/libjags.2.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/2.12/Resources/library/rjags/libs/x86_64/rjags.so
Reason: no suitable image found. Did find:
/usr/local/lib/libjags.2.dylib: mach-o, but wrong architecture
/usr/local/lib/libjags.2.dylib: mach-o, but wrong architecture
Error: package/namespace load failed for 'rjags'
我猜rjags引用庫中的一個未知文件存在一些問題,但我不確定。我在命令行是一個相當新手,並與目錄搞亂,所以任何幫助將不勝感激。