model_terms: Parse a formula object into its left-hand-side and...

View source: R/model-terms.r

model_termsR Documentation

Parse a formula object into its left-hand-side and right-hand-side components

Description

Parse a formula object into its left-hand-side and right-hand-side components

Usage

model_terms(x)

Arguments

x

Formula to parse

Value

list with named elements "lhs" and "rhs", containing variables on each respective side of the equation

Examples

# Set up a hypothetical function, then decompose into left-hand and 
# right-hand sides
form <- formula(outcome ~ treatment + confounder + unit + time)
model_terms(form)

optic documentation built on Aug. 8, 2023, 5:12 p.m.