Learn R Programming

rbmi (version 1.5.1)

as_stan_fragments: Conversion of Character Vector into Stan Code Block List

Description

Conversion of Character Vector into Stan Code Block List

Usage

as_stan_fragments(x, stan_blocks = STAN_BLOCKS)

Value

A list with the Stan code blocks.

Arguments

x

the single Stan code vector.

stan_blocks

reference list of stan blocks.

Author

Craig Gower-Page (from jmpost R package)

Details

Function only works if code is in format

data {
    <code>
}
model {
    <code>
}

That is to say we do not support code in inline format i.e.

data { <code> }
model { <code> }