as_stan_fragments: Conversion of Character Vector into Stan Code Block List

View source: R/utilities.R

as_stan_fragmentsR Documentation

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)

Arguments

x

the single Stan code vector.

stan_blocks

reference list of stan blocks.

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> }

Value

A list with the Stan code blocks.

Author(s)

Craig Gower-Page (from jmpost R package)


rbmi documentation built on Nov. 5, 2025, 7:30 p.m.