makeInteractions: Add all interactions up to a desired order

Description Usage Arguments Details Value Examples

View source: R/createFormula.R

Description

Add all interactions up to a desired order

Usage

1
makeInteractions(vars, interactionDepth)

Arguments

vars

character: variable names (potentially including polynomial expressions)

interactionDepth

integer: highest interaction order

Details

Interactions of variables with themselves (including polynomials of themselves) are not included.

Value

Character vector

Examples

1
2
BMSC:::makeInteractions(vars = c("x1", "x2",
"I(x1^2)", "I(x2^2)"), interactionDepth = 3)

BMSC documentation built on Aug. 2, 2019, 5:05 p.m.

Related to makeInteractions in BMSC...