Learn R Programming

UNIX

One can specify the path to where the Eigen header files are located and also whether to link common C++ files into every DSO/DLL we create or whether to treat the files as an extra library with:

R CMD INSTALL --configure-args='--with-eigen=/home/duncan/local --enable-lib' nimble

or, within R

install.packages("nimble", configure.args = c("--with-eigen=/home/duncan/local", "--enable-lib=true"), repos = NULL)

Windows

Typically, you need the R developer tools (i.e., compiler, make, etc.) to use nimble. Accordingly, it is quite straightforward to install the package from source as you will have the necessary tools already installed. These are available from the Rtools page on CRAN.

To install the package from source, from within R,

install.packages("nimble", type = "source", INSTALL_opts = "--merge-multiarch")

or from a local copy of the source package,

install.packages("nimble_0.6-2.tar.gz", repos = NULL, INSTALL_opts = "--merge-multiarch")

Alternatively, use the shell command (in the DOS Command prompt)

R CMD INSTALL --merge-multiarch nimble_0.6-9.tar.gz

Of course, you can also compile directly from a clone of the git repository:

R CMD INSTALL --merge-multiarch nimble

The --merge-multiarch is necessary when using a version of R that supports both 32 and 64 bit. This option to installation will ensure that create both 32 and 64 bit installations.

Creating a Windows Binary

R CMD build nimble
R CMD INSTALL --build --merge-multiarch nimble_0.6-9.tar.gz

We need to create the .tar.gz file first, hence the first command.

Copy Link

Version

Install

install.packages('nimble')

Monthly Downloads

5,631

Version

1.4.3

License

BSD_3_clause + file LICENSE | GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Christopher Paciorek

Last Published

August 22nd, 2026

Functions in nimble (1.4.3)

Inverse-Wishart

The Inverse Wishart Distribution
as.carAdjacency

Convert CAR structural parameters to adjacency, weights, num format
any_na

Determine if any values in a vector are NA or NaN
Wishart

The Wishart Distribution
as.carCM

Convert weights vector to parameters of dcar_proper distributio
RmodelBaseClass-class

Class RmodelBaseClass
StickBreakingFunction

The Stick Breaking Function
Multivariate-t

The Multivariate t Distribution
Multinomial

The Multinomial Distribution
autoBlock

Automated parameter blocking procedure for efficient MCMC sampling
Rmatrix2mvOneVar

Set values of one variable of a modelValues object from an R matrix
asRow

Turn a numeric vector into a single-row or single-column matrix
buildAGHQ

Placeholder for buildAGHQ
MultivariateNormal

The Multivariate Normal Distribution
buildAuxiliaryFilter

Placeholder for buildAuxiliaryFilter
buildLiuWestFilter

Placeholder for buildLiuWestFilter
buildMCEM

Builds an MCEM algorithm for a given NIMBLE model
buildIteratedFilter2

Placeholder for buildIteratedFilter2
buildMacro

EXPERIMENTAL: Turn a function into a model macro
buildLaplace

Placeholder for buildLaplace
buildMCMC

Create an MCMC object from a NIMBLE model, or an MCMC configuration object
checkInterrupt

Check for interrupt (e.g. Ctrl-C) during nimbleFunction execution. Part of the NIMBLE language.
clearCompiled

Clear compiled objects from a project and unload shared library
calculateWAIC

Calculating WAIC using an offline algorithm
carBounds

Calculate bounds for the autocorrelation parameter of the dcar_proper distribution
carMinBound

Calculate the lower bound for the autocorrelation parameter of the dcar_proper distribution
eigenNimbleList

eigenNimbleList definition
carMaxBound

Calculate the upper bound for the autocorrelation parameter of the dcar_proper distribution
expAv

Matrix Exponential times a vector
buildBootstrapFilter

Placeholder for buildBootstrapFilter
distributionInfo

Get information about a distribution
derived_BASE

MCMC Derived Quantities
buildEnsembleKF

Placeholder for buildEnsembleKF
declare

Explicitly declare a variable in run-time code of a nimbleFunction
deregisterDistributions

Remove user-supplied distributions from use in NIMBLE BUGS models
decide

Makes the Metropolis-Hastings acceptance decision, based upon the input (log) Metropolis-Hastings ratio
decideAndJump

Creates a nimbleFunction for executing the Metropolis-Hastings jumping decision, and updating values in the model, or in a carbon copy modelValues object, accordingly.
codeBlockClass-class

Class codeBlockClass
configureMCMC

Build the MCMCconf object for construction of an MCMC object
compileNimble

compile NIMBLE models and nimbleFunctions
configureRJ

Configure Reversible Jump for Variable Selection
getNimbleOption

Get NIMBLE Option
expm

Matrix Exponential
extractControlElement

Extract named elements from MCMC sampler control list
getDefinition

Get nimbleFunction definition
getMacroParameters

EXPERIMENTAL: Get list of parameter names generated by model macros
flat

The Improper Uniform Distribution
getBUGSexampleDir

Get the directory path to one of the classic BUGS examples installed with NIMBLE package
getParam

Get value of a parameter of a stochastic node in a model
initializeModel

Performs initialization of nimble model node values and log probabilities
identityMatrix

Create an Identity matrix (Deprecated)
modelBaseClass-class

Class modelBaseClass
makeParamInfo

Make an object of information about a model-parameter pairing for getParam. Used internally
getsize

Returns number of rows of modelValues
getSamplesDPmeasure

Get posterior samples for a Dirichlet process distribution (measure)
makeBoundInfo

Make an object of information about a model-bound pairing for getBound. Used internally
is.nl

check if a nimbleList
is.nf

check if a nimbleFunction
makeModelDerivsInfo

Information on model structure used for derivatives
getBound

Get value of bound of a stochastic node in a model
nfMethod

access (call) a member function of a nimbleFunction
modelValuesConf

Create the confs for a custom NIMBLE modelValues object
nimCopy

Copying function for NIMBLE
nfVar

Access or set a member variable of a nimbleFunction
nimCat

cat function for use in nimbleFunctions
modelInitialization

Information on initial values in a NIMBLE model
modelDefClass-class

Class for NIMBLE model definition
getConditionallyIndependentSets

Get a list of conditionally independent sets of nodes in a nimble model
nimMatrix

Creates matrix or array objects for use in nimbleFunctions
modelValues

Create a NIMBLE modelValues Object
modelValuesBaseClass-class

Class modelValuesBaseClass
nimDim

return sizes of an object whether it is a vector, matrix or array
nimIntegrate

Integration of One-Dimensional Functions
nimOptim

General-purpose Optimization
nimDerivs

Nimble Derivatives
nimNumeric

Creates numeric, integer or logical vectors for use in nimbleFunctions
nimOptimDefaultControl

Creates a default control argument for nimOptim.
nimOptimMethod

Set or get an optimization function to be used by nimOptim
nimEigen

Spectral Decomposition of a Matrix
nimPrint

print function for use in nimbleFunctions
nimStop

Halt execution of a nimbleFunction function method. Part of the NIMBLE language
nimSvd

Singular Value Decomposition of a Matrix
nimble-internal

Functions and Classes Internal to NIMBLE
nimble-package

nimble: MCMC, Particle Filtering, and Programmable Hierarchical Modeling
nimbleFunctionBase-class

Class nimbleFunctionBase
nimbleFunctionList-class

Create a list of nimbleFunctions
nimbleFunction

create a nimbleFunction
nimbleCode

Turn BUGS model code into an object for use in nimbleModel or readBUGSmodel
nimbleExternalCall

Create a nimbleFunction that wraps a call to external compiled code
optimControlNimbleList

Data type for the control parameter of nimOptim
nimbleType-class

create a nimbleType object
optimDefaultControl

nimble-R-functions

NIMBLE language functions for R-like vector construction
nodeFunctions

calculate, calculateDiff, simulate, or get the current log probabilities (densities) a set of nodes in a NIMBLE model
nimble-math

Mathematical functions for BUGS and nimbleFunction programming
nimbleList

create a nimbleList
resize

Resizes a modelValues object
registerDistributions

Add user-supplied distributions for use in NIMBLE BUGS models
nimbleFunctionVirtual

create a virtual nimbleFunction, a base class for other nimbleFunctions
nimbleOptions

NIMBLE Options Settings
nimbleRcall

Make an R function callable from compiled nimbleFunctions (including nimbleModels).
run.time

Time execution of NIMBLE code
runAGHQ

Placeholder for runAGHQ
rankSample

Generates a weighted sample (with replacement) of ranks
readBUGSmodel

Create a NIMBLE BUGS model from a variety of input formats, including BUGS model files
pow_int

Power function for integer-valued exponent
printErrors

Print error messages after failed compilation
parameterTransform

Automated transformations of model nodes to unconstrained scales
nimbleModel

Create a NIMBLE model from model code
nimbleMCMC

Executes one or more chains of NIMBLE's default MCMC algorithm, for a model specified using BUGS code
optimResultNimbleList

Data type for the return value of nimOptim
runCrossValidate

Perform k-fold cross-validation on a NIMBLE model fit by MCMC
setSize

set the size of a numeric variable in NIMBLE
runLaplace

Placeholder for runLaplace
runMCMC

Run one or more chains of an MCMC algorithm and return samples, summary and/or WAIC
setAndCalculate

Creates a nimbleFunction for setting the values of one or more model nodes, calculating the associated deterministic dependents and logProb values, and returning the total sum log-probability.
setupMargNodes

Organize model nodes for marginalization
simNodes

Basic nimbleFunctions for calculate, simulate, and getLogProb with a set of nodes
setupOutputs

Explicitly declare objects created in setup code to be preserved and compiled as member data
setAndCalculateOne

Creates a nimbleFunction for setting the value of a scalar model node, calculating the associated deterministic dependents and logProb values, and returning the total sum log-probability.
sampler_BASE

MCMC Sampling Algorithms
summaryLaplace

Placeholder for summaryLaplace
svdNimbleList

svdNimbleList definition
testBUGSmodel

Tests BUGS examples in the NIMBLE system
valueInCompiledNimbleFunction

get or set value of member data from a compiled nimbleFunction using a multi-interface
waic

Using WAIC
singleVarAccessClass-class

Class singleVarAccessClass
summaryAGHQ

Placeholder for summaryAGHQ
simNodesMV

Basic nimbleFunctions for using a NIMBLE model with sets of stored values
t

The t Distribution
waicDetailsNimbleList

waicDetailsNimbleList definition
values

Access or set values for a set of nodes in a model
withNimbleOptions

Temporarily set some NIMBLE options.
waicNimbleList

waicNimbleList definition
ADproxyModelClass-class

create an ADproxyModelClass object
CAR-Proper

The CAR-Proper Distribution
CAR-Normal

The CAR-Normal Distribution
ADNimbleList

Data type for the return value of nimDerivs
ADbreak

NIMBLE language function to break tracking of derivatives
CmodelBaseClass-class

Class CmodelBaseClass
Categorical

The Categorical Distribution
CAR_calcNumIslands

Calculate number of islands based on a CAR adjacency matrix.
BUGSdeclClass-class

BUGSdeclClass contains the information extracted from one BUGS declaration
ChineseRestaurantProcess

The Chinese Restaurant Process Distribution
Exponential

The Exponential Distribution
LKJ

The LKJ Distribution for the Cholesky Factor of a Correlation Matrix
Interval

Interval calculations
MCMCconf-class

Class MCMCconf
Double-Exponential

The Double Exponential (Laplace) Distribution
Inverse-Gamma

The Inverse Gamma Distribution
Dirichlet

The Dirichlet Distribution
Constraint

Constraint calculations in NIMBLE
CnimbleFunctionBase-class

Class CnimbleFunctionBase