-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
117 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ NAMESPACE_RG2 | |
notebooks | ||
reports | ||
extra_tests | ||
releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,107 @@ | ||
###################################################################################################### | ||
### | ||
### runjags package | ||
### Matthew Denwood, 2nd October 2015 | ||
### | ||
### Installation from source - help and tips | ||
### | ||
### The instructions below are modified from the rjags package | ||
### Original file is Copyright (C) Martyn Plummer, licensed under GPL-2 | ||
### | ||
###################################################################################################### | ||
|
||
|
||
The runjags package itself is entirely written in R, but it does contain | ||
a JAGS module that provides additional distributions that must be | ||
compiled for your system against a functional JAGS installation. See | ||
the platform specific instructions below for how to do this. | ||
|
||
If you are unable to compile the C++ code and don't require the distributions | ||
provided in the JAGS extension module, see the 'Compile-free' instructions | ||
at the end of this document. | ||
|
||
|
||
|
||
Windows | ||
------- | ||
|
||
At compile time, there is no way for Windows to guess where the JAGS | ||
library is installed, so you must supply the location yourself using | ||
the make variable JAGS_ROOT, defining it in the file HOME/.R/Makevars.win | ||
like so: | ||
|
||
JAGS_ROOT=c:\Program Files\JAGS\JAGS-3.3.0 | ||
|
||
The configure script also needs to know the version of JAGS being used, | ||
and will attempt to guess this from the JAGS_ROOT path. If a non- | ||
standard install path has been used you will need to provide the correct | ||
JAGS major-version number like so: | ||
|
||
JAGS_MAJOR_VERSION=3 | ||
|
||
The header files for the module itself should be able to detect the | ||
version of JAGS installed on your system, but if you encounter compiler | ||
errors it may help to specify JAGS_MAJOR_VERSION even if JAGS is | ||
installed in a standard directory - e.g. JAGS 4-beta requires: | ||
|
||
JAGS_MAJOR_VERSION=4 | ||
|
||
|
||
|
||
Unix (including Mac OS X) | ||
------------------------- | ||
|
||
The configure script will try to guess the location of the JAGS | ||
library installation. It will look in /<prefix>/<lib>, where | ||
|
||
- <prefix> is the determined from the location of the jags | ||
script that launches the command line interface. | ||
|
||
For example, if this is "/usr/local/bin/jags", then prefix will | ||
be "/usr/local" | ||
|
||
- <lib> is derived from the value of "LIBnn", returned by | ||
"R CMD config LIBnn". | ||
|
||
This is particularly important on 64-bit unix, where R is | ||
installed by default in /usr/local/lib64 and LIBnn is "lib64" | ||
|
||
The configure script will also look for JAGS headers in | ||
/<prefix>/include/JAGS | ||
|
||
If the configure script fails to find the JAGS headers or library, | ||
you can set the environment variables JAGS_INCLUDE and JAGS_LIB | ||
to point to the correct directory. | ||
|
||
The header files for the module itself should be able to detect the | ||
version of JAGS installed on your system, but a JAGS_MAJOR_VERSION | ||
environmental variable can be set in case of problems which may be | ||
encountered with some versions of JAGS - e.g. JAGS 4-beta requires: | ||
|
||
export JAGS_MAJOR_VERSION=4 | ||
R CMD install runjags... | ||
|
||
|
||
|
||
Compile-free | ||
------------ | ||
|
||
The standard version of the runjags package includes a JAGS | ||
extension module providing additional distributions in the Pareto | ||
family (amongst others). | ||
|
||
If you want to install runjags without the additional JAGS module, | ||
then you can simply remove the configure(.ac) files and entire src | ||
directory before running R CMD install runjags... This does not | ||
require any C++ compilers, or even for JAGS to be installed on | ||
your system. | ||
|
||
Alternatively there is a version of runjags with the JAGS module | ||
removed hosted on the sourceforge page for runjags at: | ||
http://sourceforge.net/projects/runjags/). | ||
|
||
###################################################################################################### | ||
### | ||
### Installation instructions for the runjags package | ||
### Matthew Denwood, 27th February 2021 | ||
### | ||
### The instructions below are modified from the rjags package | ||
### Original file is Copyright (C) Martyn Plummer, licensed under GPL-2 | ||
### | ||
###################################################################################################### | ||
|
||
|
||
The runjags package itself is entirely written in R, but it does contain | ||
a JAGS module that provides additional distributions that must be | ||
compiled for your system against a functional JAGS installation. See | ||
the platform specific instructions below for how to do this. | ||
|
||
If you are unable to compile the C++ code and don't require the distributions | ||
provided in the JAGS extension module, see the 'Compile-free' instructions | ||
at the end of this document. | ||
|
||
|
||
|
||
Installation on Windows | ||
----------------------- | ||
|
||
At compile time, there is no way for Windows to guess where the JAGS | ||
library is installed, so you must supply the location yourself using | ||
the make variable JAGS_ROOT, defining it in the file HOME/.R/Makevars.win | ||
like so: | ||
|
||
JAGS_ROOT=c:/Progra~1/JAGS/JAGS-4.0.0 | ||
|
||
where HOME is the default starting directory for an R session launched | ||
from the start menu (typically your Documents folder). | ||
|
||
The configure script also needs to know the version of JAGS being used, | ||
and will attempt to guess this from the JAGS_ROOT path. If a non- | ||
standard install path has been used you will need to provide the correct | ||
JAGS major-version number like so: | ||
|
||
JAGS_MAJOR_VERSION=4 | ||
|
||
The header files for the module itself should be able to detect the | ||
version of JAGS installed on your system, but if you encounter compiler | ||
errors it may help to specify JAGS_MAJOR_VERSION even if JAGS is | ||
installed in a standard directory. | ||
|
||
|
||
|
||
Unix/Linux: pkg-config | ||
------------------------ | ||
|
||
If you have pkg-config installed then the configure script will use it | ||
to detect the JAGS library and set the compiler and linker flags for | ||
runjags. You can test this capability in a unix shell by typing | ||
|
||
pkg-config --modversion jags | ||
|
||
If this does not detect your JAGS installation then it means that the | ||
file 'jags.pc' is not on the search path of pkg-config. In this case | ||
you should add it by setting the environment variable PKG_CONFIG_PATH. | ||
For example if the full path to 'jags.pc' is | ||
'/usr/local/lib64/pkgconfig/jags.pc', then set | ||
|
||
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig | ||
|
||
before installing runjags. | ||
|
||
Recall that most Linux distributions divide software into `user' and | ||
`developer' versions, so if you are using a pre-built JAGS binary | ||
package for your Linux distribution then remember to install the | ||
developer version before attempting to install the runjags package. | ||
|
||
The header files for the module itself should be able to detect the | ||
version of JAGS installed on your system, but a JAGS_MAJOR_VERSION | ||
environmental variable can be set in case of problems which may be | ||
encountered with some versions of JAGS - e.g. JAGS 4-beta requires: | ||
|
||
export JAGS_MAJOR_VERSION=4 | ||
R CMD install runjags | ||
|
||
|
||
|
||
Unix/Linux: legacy configuration | ||
---------------------------------- | ||
|
||
Legacy configuration is used whenever pkg-config is not installed or | ||
otherwise fails to detect the JAGS library. Legacy configuration is | ||
deprecated and will be removed in a future version. If you experience | ||
problems with installing runjags then it is strongly recommended that | ||
you try to get pkg-config working. Otherwise, you can refer to the | ||
legacy installation instructions given within the rjags package. | ||
|
||
|
||
|
||
Compile-free | ||
------------ | ||
|
||
The standard version of the runjags package includes a JAGS | ||
extension module providing additional distributions in the Pareto | ||
family (amongst others). | ||
|
||
If you want to install runjags without the additional JAGS module, | ||
then you can simply remove the configure(.ac) files and entire src | ||
directory before running R CMD install runjags. This does not | ||
require any C++ compilers, or even for JAGS to be installed on | ||
your system. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.