Error installing rjags:
I am trying to install rjags on a new ubuntu 11.04 installation. Actually, I am trying to write a generic script so that the installation can be automated. I'd like to know how I can do this while avoiding conflicts.

I did the following:

    #in bash
    sudo apt-get install jags 
    sudo R                    
    #in R
    install.packages('rjags')

this gives the following error:

    configure: error: "JAGS module directory 
    /usr/lib/JAGS/modules-3 does not exist."

in `/usr/lib/JAGS/`, there is a folder `modules-2.2.0`.

I realized that [rjags depends on JAGS 3.0](http://cran.r-project.org/web/packages/rjags/index.html), but the ubuntu repository has JAGS 2.2. More importantly, this mismatch makes it more challenging to automate the installation script.

I would like to automate a script that will install compatable `JAGS` and `rjags`, by either:

1. installing JAGS 2.2 and the compatable rjags version (which version?)
2. generically installing the version of JAGS currently in the ubuntu repository and the appropriate rjags version, or
3. generically installing the most recent version of rjags at cran and the appropriate version of JAGS

I am most interested in case 1, but am also curious how I could implement cases 2 and/or 3.

How can I do this?

Error installing rjags:
===

I am trying to install rjags on a new ubuntu 11.04 installation. Actually, I am trying to write a generic script so that the installation can be automated. I'd like to know how I can do this while avoiding conflicts.

I did the following:

    #in bash
    sudo apt-get install jags 
    sudo R                    
    #in R
    install.packages('rjags')

this gives the following error:

    configure: error: "JAGS module directory 
    /usr/lib/JAGS/modules-3 does not exist."

in `/usr/lib/JAGS/`, there is a folder `modules-2.2.0`.

I realized that [rjags depends on JAGS 3.0](http://cran.r-project.org/web/packages/rjags/index.html), but the ubuntu repository has JAGS 2.2. More importantly, this mismatch makes it more challenging to automate the installation script.

I would like to automate a script that will install compatable `JAGS` and `rjags`, by either:

1. installing JAGS 2.2 and the compatable rjags version (which version?)
2. generically installing the version of JAGS currently in the ubuntu repository and the appropriate rjags version, or
3. generically installing the most recent version of rjags at cran and the appropriate version of JAGS

I am most interested in case 1, but am also curious how I could implement cases 2 and/or 3.

How can I do this?
