Discussion:
[R-SIG-Mac] (no subject)
Joanna Burgar
2014-09-22 23:13:21 UTC
Permalink
Good day,

I am trying to run R2jags on R version 3.0.2 (2013-09-25) -- "Frisbee Sailing". I have downloaded jags (JAGS-Mavericks-3.4.0) and successfully installed both rjags and R2jags yet for some reason when I try and load the library(rjags) I receive the following error message:

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.0/Resources/library/rjags/libs/rjags.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so, 10): Symbol not found: __ZN5RangeC1ERKSt6vectorIiSaIiEES4_
Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
Expected in: /usr/local/lib/libjags.3.dylib
in /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
Error: package or namespace load failed for ?rjags?


Does anyone have any idea why this might be? I have also tried other versions of R and it doesn't seem to be working for them either.

Thanks!
Joanna

_______________________________________________________
install.packages("rjags", dependencies=TRUE)
also installing the dependency ?coda?

trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/coda_0.16-1.tgz'
Content type 'application/x-gzip' length 195822 bytes (191 Kb)
opened URL
==================================================
downloaded 191 Kb

trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/rjags_3-13.tgz'
Content type 'application/x-gzip' length 155926 bytes (152 Kb)
opened URL
==================================================
downloaded 152 Kb


The downloaded binary packages are in
/var/folders/zl/w_8jclgx3zngdxtn_kmfb79m0000gn/T//RtmpfXMoO5/downloaded_packages
install.packages("R2jags", dependencies=TRUE)
also installing the dependencies ?abind?, ?R2WinBUGS?

trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/abind_1.4-0.tgz'
Content type 'application/x-gzip' length 32962 bytes (32 Kb)
opened URL
==================================================
downloaded 32 Kb

trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/R2WinBUGS_2.1-19.tgz'
Content type 'application/x-gzip' length 777630 bytes (759 Kb)
opened URL
==================================================
downloaded 759 Kb

trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/R2jags_0.04-03.tgz'
Content type 'application/x-gzip' length 55203 bytes (53 Kb)
opened URL
==================================================
downloaded 53 Kb


The downloaded binary packages are in
/var/folders/zl/w_8jclgx3zngdxtn_kmfb79m0000gn/T//RtmpfXMoO5/downloaded_packages


library(rjags)
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 object '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so, 10): Symbol not found: __ZN5RangeC1ERKSt6vectorIiSaIiEES4_
Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
Expected in: /usr/local/lib/libjags.3.dylib
in /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
Error: package or namespace load failed for ?rjags?

[[alternative HTML version deleted]]
Simon Urbanek
2014-09-22 23:32:55 UTC
Permalink
Post by Joanna Burgar
Good day,
I am trying to run R2jags on R version 3.0.2 (2013-09-25) -- "Frisbee Sailing". I have downloaded jags (JAGS-Mavericks-3.4.0)
That's the problem - your'e using old R version with recent JAGS - that doesn't work. You should use most recent R (3.1.1 at this point) with the most recent JAGS. The other alternative is to use old R with old JAGS versions - not the best idea, though.

Cheers,
Simon
Post by Joanna Burgar
call: dyn.load(file, DLLpath = DLLpath, ...)
dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so, 10): Symbol not found: __ZN5RangeC1ERKSt6vectorIiSaIiEES4_
Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
Expected in: /usr/local/lib/libjags.3.dylib
in /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
Error: package or namespace load failed for ?rjags?
Does anyone have any idea why this might be? I have also tried other versions of R and it doesn't seem to be working for them either.
Thanks!
Joanna
_______________________________________________________
install.packages("rjags", dependencies=TRUE)
also installing the dependency ?coda?
trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/coda_0.16-1.tgz'
Content type 'application/x-gzip' length 195822 bytes (191 Kb)
opened URL
==================================================
downloaded 191 Kb
trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/rjags_3-13.tgz'
Content type 'application/x-gzip' length 155926 bytes (152 Kb)
opened URL
==================================================
downloaded 152 Kb
The downloaded binary packages are in
/var/folders/zl/w_8jclgx3zngdxtn_kmfb79m0000gn/T//RtmpfXMoO5/downloaded_packages
install.packages("R2jags", dependencies=TRUE)
also installing the dependencies ?abind?, ?R2WinBUGS?
trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/abind_1.4-0.tgz'
Content type 'application/x-gzip' length 32962 bytes (32 Kb)
opened URL
==================================================
downloaded 32 Kb
trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/R2WinBUGS_2.1-19.tgz'
Content type 'application/x-gzip' length 777630 bytes (759 Kb)
opened URL
==================================================
downloaded 759 Kb
trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/R2jags_0.04-03.tgz'
Content type 'application/x-gzip' length 55203 bytes (53 Kb)
opened URL
==================================================
downloaded 53 Kb
The downloaded binary packages are in
/var/folders/zl/w_8jclgx3zngdxtn_kmfb79m0000gn/T//RtmpfXMoO5/downloaded_packages
library(rjags)
Loading required package: coda
Loading required package: lattice
call: dyn.load(file, DLLpath = DLLpath, ...)
dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so, 10): Symbol not found: __ZN5RangeC1ERKSt6vectorIiSaIiEES4_
Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
Expected in: /usr/local/lib/libjags.3.dylib
in /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
Error: package or namespace load failed for ?rjags?
[[alternative HTML version deleted]]
_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
David Winsemius
2014-09-23 00:31:04 UTC
Permalink
Post by Simon Urbanek
Post by Joanna Burgar
Good day,
I am trying to run R2jags on R version 3.0.2 (2013-09-25) -- "Frisbee Sailing". I have downloaded jags (JAGS-Mavericks-3.4.0)
That's the problem - your'e using old R version with recent JAGS - that doesn't work. You should use most recent R (3.1.1 at this point) with the most recent JAGS. The other alternative is to use old R with old JAGS versions - not the best idea, though.
It's also important to match the version of OSX to the JAGS version. If you are one of the laggards in adopting Mavericks, as am I, then it's not immediately obvious where to find the SnowLeopard version.

The default Mavericks version that pops up with this SourceForge link does not work with my Lion machine:

http://sourceforge.net/projects/mcmc-jags/?source=typ_redirect

You need to go to this page instead:

http://sourceforge.net/projects/mcmc-jags/files/JAGS/3.x/Mac%20OS%20X/

I picked this link:

http://sourceforge.net/projects/mcmc-jags/files/JAGS/3.x/Mac%20OS%20X/JAGS-SnowLeopard-3.4.0.dmg/download

Once that was installed I was able to build the rjags and R2jags from CRAN sources using the GUI package installer.
--
David.
Post by Simon Urbanek
sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] grDevices datasets splines graphics utils stats grid methods
[9] base

other attached packages:
[1] R2jags_0.04-03 rjags_3-13 coda_0.16-1 data.table_1.9.2 rCharts_0.4.5
[6] devtools_1.5 rms_4.2-1 SparseM_1.03 Hmisc_3.14-4 Formula_1.1-1
[11] survival_2.37-7 sos_1.3-8 brew_1.0-6 lattice_0.20-29

loaded via a namespace (and not attached):
[1] abind_1.4-0 boot_1.3-11 cluster_1.15.2 digest_0.6.4
[5] evaluate_0.5.3 httr_0.3 latticeExtra_0.6-26 memoise_0.1
[9] multcomp_1.3-1 mvtnorm_0.9-9999 nlme_3.1-117 parallel_3.1.1
[13] plyr_1.8.1 polspline_1.1.9 quantreg_5.05 R2WinBUGS_2.1-19
[17] RColorBrewer_1.0-5 Rcpp_0.11.1 RCurl_1.95-4.3 reshape2_1.2.2
[21] RJSONIO_1.3-0 rpart_4.1-8 sandwich_2.3-0 stringr_0.6.2
[25] tools_3.1.1 whisker_0.3-2 yaml_2.1.11 zoo_1.7-11

snipped error reports

David Winsemius
Alameda, CA, USA
Loading...