Before installing NIMBLE, you need a compiler and related tools such as make that R can use. You’ll need these anyway to use NIMBLE.

On Windows you can get these by installing Rtools.exe from here. Important: with R version 4.0 or newer, for which you need Rtools40, be sure to follow the instructions in the section “Putting Rtools on the PATH” to set the PATH after the installation is complete. For older versions of R, for which you would use Rtools35.exe, be sure to check the box that will modify your PATH during the installation process.

On Mac OS X you can get these by installing the XCode command line tools. (The full XCode development environment is fine but not required.)

More details and troubleshooting tips are provided in Section 4 of the User Manual.

If you install a new version of R, you will need to reinstall NIMBLE.

Current version (1.1.0)

Installing from CRAN

NIMBLE is available from CRAN as a source package and as a binary package for Windows and Mac OS. Please note that even if you install from CRAN, you still need to have a compiler and related tools installed as discussed above and in Section 4 of our User Manual.

Installing from

If you prefer, you can install the package directly from our repository as follows.

If you install in this manner, please first install the igraph, R6, coda, numDeriv, and pracma R packages as these are dependencies and will not be automatically installed when installing from source.

Only the installation from source works when installing from our repository. Invoke the following at the R command line:

# Install from source for MacOS, Linux, or Windows:
install.packages("nimble", repos = "", type = "source")
# the 'type = "source"' is unnecessary for Linx

Or download the source package for installation via R CMD INSTALL on Linux, Mac, or Windows

The NIMBLE source code can be viewed by unzipping the source package tarball or directly on our GitHub repository.

Installing from GitHub

You can install either the current release or the latest development version from GitHub.

# For the current release:
install_github("nimble-dev/nimble", ref = "master", subdir = "packages/nimble")
# For the development release:
install_github("nimble-dev/nimble", ref = "devel", subdir = "packages/nimble")

Older versions

Previous releases of NIMBLE can be found here.

For a summary of changes in each version, please see the News page or the NEWS file in the package.

Beta testing of automatic differentiation features

Automatic differentiation, including support for Hamiltonian Monte Carlo and Laplace approximation is now part of NIMBLE as of the version 1.0.0 release.  Instructions for trying it are in our User Manual.