From ejfertig at jhmi.edu  Fri Nov 20 20:43:17 2009
From: ejfertig at jhmi.edu (Elana Fertig)
Date: Fri, 20 Nov 2009 14:43:17 -0500
Subject: [Rd] Including local dynamic libraries
Message-ID: <180E96B0-E49C-4560-A4D3-808F24E11D9F@jhmi.edu>

Hi All,

I am trying to install the package rjags into a local library on a  
machine for which I do not have root permissions.

Using the command: R CMD INSTALL --configure-args="--with-jags-include= 
${JAGSBIN}/include/JAGS --with-jags-lib=${JAGSBIN}/lib/ --with-jags- 
modules=${JAGSBIN}/lib/JAGS/modules" CMD INSTALL -l ${JAGSBIN}/lib/ ../ 
rjags_1.0.3-12.tar.gz

Where ${JAGSBIN} is defined as a local directory, the installation  
seems to be working fine.  Then, I go into R and type the following  
commands:
 > .libPaths("${JAGSBIN}/lib/")
 > library("rjags")

I get the following error

Loading required package: coda
Loading required package: lattice
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared library '${JAGSBIN}/lib/rjags/libs/rjags.so':
   libjags.so.1: cannot open shared object file: No such file or  
directory
Error : .onLoad failed in 'loadNamespace' for 'rjags'
Error: package/namespace load failed for 'rjags'

Ideally, I would fix this problem by adding the appropriate libraries  
to /user/local/lib64 .  However, since I do not have root permissions  
I am not able to make this addition.  How can I have R recognize c++  
libraries from my local path?

Thanks so much in advance for your help.



[Rd] Including local dynamic libraries
Elana Fertig