Sunday, June 06, 2010

General steps to compile JAGS in a Linux based OS system and install rjags in R

I have an entry here about how to install JAGS and rjags in Fedora.  However, I have exchanged emails with Robert Dorazio and Dr. Martyn Plummer.  Here are the easier steps to compile JAGS and install rjags in R.

1. After you extract the source code of JAGS, go to the folder where the JAGS makefile is using a terminal.
cd JAGS-2.1.0

2. In a terminal, type the following
sudo ./configure --prefix=/usr
sudo make
sudo make install

3. The step 2 will help your system to identify where the JAGS is.  So in R, you can simply install rjags as:
install.package("rjags")

Of course, once you can install rjags successfully in R, you can install our R2jags package as well:
install.package("R2jags")

1 comment:

小豬媽 said...

Hello,請問你是畢業於嘉義協同中學國三丁的蘇毓淞嗎? 我是雨潔,若你有看到我的留言,請回覆我email:bj8584@yahoo.com.tw

有同學會資料以及通訊錄要給你,謝謝~