Issues with the runjags package
|Back to home page||
The wiqid package for R
uses functions in the runjags
package. This sometimes has problems, a couple of which are
JAGS was not found in the common install locations on your system... or Unable to call JAGS...
Find the file jags-terminal.exe on your computer. On Windows, likely locations are:
If you have a non-English version of Windows, you may have something like "Archivos de programa" or "Programme" instead of "Program files".
After loading runjags, you can tell runjags where to find JAGS:
...inserting your own path to jags-terminal.exe (with /forward/slashes/ or \\double\\back\\slashes\\) in place of the text in red.
But you have to do that each time you use runjags. If you do this often, create or modify your personal ".Rprofile" file. This is usually in your "My Documents" folder. You can find out if it exists with the following code:
This returns 0 if the file already exists, -1 if it doesn't exist. If it does exist, you can edit it with Notepad. If it does not exist, Windows will not allow you to create it, so we need to get R to help. Either way, you can use this code to create or modify .Rprofile:
...inserting your own path to jags-terminal.exe in place of the text in red.
The object .runjags.options will be created in your workspace every time you start R, and runjags will use it to set its options when you load the package.
| Updated 19 Dec 2014
by Mike Meredith|