jg_blocks: Parses blocks in JAGS model code

Description Usage Arguments Value Examples

Description

Converts blocks in JAGS model code into a named character vector where the names are the block names.

Usage

1

Arguments

x

string of JAGS model code

Value

A named character vector where the names are the block names. Throws an error if the brackets are unbalanced.

Examples

1
jg_blocks("data {X <- 2} model { Y ~ dpois(X) }")

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