tdt_split_bars: Split a formula right-hand side into fixed terms and '(x |...

View source: R/utils.R

tdt_split_barsR Documentation

Split a formula right-hand side into fixed terms and (x | g) bar terms

Description

Walks the parsed expression instead of using text patterns, so grouping calls with nested parentheses – (1 | gr(species, cov = A)) – survive intact (the regex predecessors stopped at the first ⁠)⁠ and aborted; issue #12). Returns ⁠list(fixed = <RHS string>, bars = <list of ⁠lhs | rhs⁠ calls>)⁠; fixed is "1" when nothing but bar terms remain.

Usage

tdt_split_bars(rhs)

bayesTLS documentation built on Nov. 29, 2026, 1:06 a.m.