model_terms {optic}R 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)

[Package optic version 1.0.1 Index]