jg_block_names-set: Set block names in JAGS model code

Description Usage Arguments Value Examples

Description

Sets block names in JAGS model code. Throws an error if unbalanced brackets. Strips out comments.

Usage

1
jg_block_names(x) <- value

Arguments

x

string of JAGS model code

value

character vector of block names

Value

Modified JAGS model code.

Examples

1
2
3
 x <- "data {X <- 2} model { Y ~ dpois(X) }"
jg_block_names(x) <- c("settings", "model")
print(x)

poissonconsulting/jaggernaut documentation built on Feb. 18, 2021, 11:10 p.m.