nimbleCode: Turn BUGS model code into an object for use in 'nimbleModel'...

View source: R/BUGS_readBUGS.R

nimbleCodeR Documentation

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

Description

Simply keeps model code as an R call object, the form needed by nimbleModel and optionally usable by readBUGSmodel.

Usage

nimbleCode(code)

Arguments

code

expression providing the code for the model

Details

It is equivalent to use the R function quote. nimbleCode is simply provided as a more readable alternative for NIMBLE users not familiar with quote.

Author(s)

Daniel Turek

Examples

code <- nimbleCode({
    x ~ dnorm(mu, sd = 1)
    mu ~ dnorm(0, sd = prior_sd)
})

nimble documentation built on July 9, 2023, 5:24 p.m.