Learn R Programming

BMSC (version 0.2.1)

makeInteractions: Add all interactions up to a desired order

Description

Add all interactions up to a desired order

Usage

makeInteractions(vars, interactionDepth)

Arguments

vars

character: variable names (potentially including polynomial expressions)

interactionDepth

integer: highest interaction order

Value

Character vector

Details

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

Examples

Run this code
# NOT RUN {
BMSC:::makeInteractions(vars = c("x1", "x2",
"I(x1^2)", "I(x2^2)"), interactionDepth = 3)
# }

Run the code above in your browser using DataLab