powered by
Add all interactions up to a desired order
makeInteractions(vars, interactionDepth)
character: variable names (potentially including polynomial expressions)
integer: highest interaction order
Character vector
Interactions of variables with themselves (including polynomials of themselves) are not included.
# 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