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

Description Usage Arguments Details Author(s) Examples

View source: R/BUGS_readBUGS.R

Description

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

Usage

1
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

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

Example output

nimble version 0.6-6 is loaded.
For more information on NIMBLE and a User Manual,
please visit http://R-nimble.org.

Attaching package: 'nimble'

The following object is masked from 'package:stats':

    simulate

nimble documentation built on May 23, 2021, 5:07 p.m.