Installing R and JAGS on Ubuntu OS |
|
| HOME |
I recently tried installing R and JAGS on my machine running
Ubuntu. I wanted to test my
BEST
and
wiqid
packages with the new
version of JAGS on Ubuntu. It took me a while, but I finally
found a simple way to do this which might be of interest to
others.
I already had R and JAGS 3 installed, together with
the
I was running the Long Term Support (LTS) version of Ubuntu, Trusty, so decided to upgrade to the latest, Wily, before going further, but I found that crashed regularly, so reinstalled Trusty. At this point I had a clean OS install.
The simplest way to install R, JAGS and
Installing
Update 9 Aug 2017
: With a fresh install of Ubuntu
16.04.3 LTS (
Xenial
), I ran the above 3 lines, then in R
did
If you already have JAGS 3 installed
I actually tried to install JAGS 4 on the machine before
reinstalling Ubuntu. On Windows, JAGS 4 is installed in a
separate folder to JAGS 3, so you can happily have both on your
machine and both old and new versions of
The apparent reason for this was components of JAGS 3 which had not been removed when JAGS 4 was installed, as explained by Martyn Plummer here . So I uninstalled and purged, and then checked for remaining files:
I still had stuff in /usr/local/lib, so navigated to there and manually deleted the JAGS directory and all the jagslib* files (with sudo rm -r as they are read-only). Then reinstalled JAGS 4 from Michael Rutter's PPA and it all worked. Installing RStudioIn Windows, I like to use Notepad++ with NppToR , but those aren't available for Linux distros, so on Ubuntu I use RStudio. With Trusty, I downloaded the latest version of RStudio from their download page and opened it with Ubuntu Software Center, and that worked out of the box. Update 9 Aug 2017 : With Xenial, that didn't work; I needed to install libjpeg62 first. I failed to do that with apt-get, so downloaded the libjpeg62 installer from packages.ubuntu.com and the RStudio installer as above, then did:
That gave me the names of the installers that I could copy/paste into the following commands:
Once that was done, I could run RStudio normally. |
|
Updated 9 Aug 2017 by Mike Meredith
|
|