I recive some error when trying to load the rjags. I use the standard install.packages("rjags"), which seems to be fine. But when I load the package, it does not work. This is what I get:
> 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’
>
Any suggestions?
I use "R version 3.1.2 (2014-10-31)" "Pumpkin Helmet"
I solved it by first removing the previously installed rjags
package.
The I installed the latest update of rjags
by installing from https://sourceforge.net/projects/mcmc-jags/ and installed it as instructed by the readme file.
Then i just loaded it as usual in R.