flat_expr {mmrm}R Documentation

Flatten Expressions for Non-standard Evaluation

Description

Used primarily to support the parsing of covariance structure definitions from formulas, these functions flatten the syntax tree into a hierarchy-less grammar, allowing for parsing that doesn't abide by R's native operator precedence.

Usage

flatten_call(call)

flatten_expr(expr)

Arguments

call, expr

(language)
a language object to flatten.

Details

Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

Value

A list of atomic values, symbols, infix operator names and subexpressions.

Functions


[Package mmrm version 0.3.15 Index]