[R] Problems loading rjags in R 2.11.0 under OS X 10.5.8

Ruben Garcia Berasategui rubgb at binus.ac.id
Sat Aug 28 02:59:23 CEST 2010

dear Professor Ripley,
thank you very much for your prompt reply. You are absolutely right. I didn't have the latest version installed although I used the command: install.packages("rjags").
Apparently, you only get the latest version of packages if you have the most up to date version of R, which is not my case. Please correct me if I'm mistaken.
I just ended up installing rjags 2.1.0-6 manually from the terminal and everything is working fine now.
----- Original Message -----
From: "Prof Brian Ripley" <ripley at stats.ox.ac.uk>
To: "Ruben Garcia Berasategui" <rubgb at binus.ac.id>
Cc: "r-help" <r-help at r-project.org>
Sent: Friday, August 27, 2010 12:58:54 PM GMT +07:00 Bangkok, Hanoi, Jakarta
Subject: Re: [R] Problems loading rjags in R 2.11.0 under OS X 10.5.8

On Fri, 27 Aug 2010, Ruben Garcia Berasategui wrote:

> Dear list members,

> I'm trying to use JAGS 2.1.0 from within R but every time I try to 
> load the rjags package I receive the following message:

Which version of 'the rjags package' and where did you get it from?
I have 2.1.0-6, installed as a binary from CRAN, and I see

tystie% otool -L rjags.so
 	rjags.so (compatibility version 0.0.0, current version 0.0.0)
 	/usr/local/lib/libjags.2.dylib (compatibility version 3.0.0, current version 3.1.0)

so that is not the version you have (which is looking for 

My guess is that you have rjags_1.0.x.

> Loading required package: coda
> Loading required package: lattice
> Error : .onLoad failed in loadNamespace() for 'rjags', details:
>  call: dyn.load(file, DLLpath = DLLpath, ...)
>  error: unable to load shared library '/Library/Frameworks/R.framework/Resources/library/rjags/libs/i386/rjags.so':
>  dlopen(/Library/Frameworks/R.framework/Resources/library/rjags/libs/i386/rjags.so, 10): Library not loaded: /usr/local/lib/libjags.1.dylib
>  Referenced from: /Library/Frameworks/R.framework/Resources/library/rjags/libs/i386/rjags.so
>  Reason: image not found
> Error: package/namespace load failed for 'rjags'
> Any help regarding how to solve this problem would be greatly appreciated.

Re-install rjags, maybe via update.packages() or the Package Installer 
menu item if you use R.app?

> Many thanks in advance,
> Ruben

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list