Check whether a variable participates in a formula interaction
formula_has_interaction(formula, variable)A single logical value indicating whether an interaction term involves
variable, including through a transformation such as factor(variable).
A model formula.
Character, the name of the variable to check.
Uses expanded model terms, so interactions removed with - do not
count. Arithmetic inside I() is not treated as a formula interaction.