formula_expand: Expand all interaction terms in a formula.

View source: R/bruceR-stats_4_regress.R

formula_expandR Documentation

Expand all interaction terms in a formula.

Description

Expand all interaction terms in a formula.

Usage

formula_expand(formula, as.char = FALSE)

Arguments

formula

R formula or a character string indicating the formula.

as.char

Return character? Defaults to FALSE.

Value

A formula/character object including all expanded terms.

Examples

formula_expand(y ~ a*b*c)
formula_expand("y ~ a*b*c")


bruceR documentation built on June 22, 2024, 12:26 p.m.