Learn R Programming

regressinator (version 0.2.0)

in_interaction: Determine if a predictor is involved in an interaction

Description

This presently does not work for any term like poly(x, 3) or I(x^2), since the terms object contains those names, not the names of the underlying predictors.

Usage

in_interaction(formula, predictor)

Value

TRUE if in an interaction, FALSE otherwise

Arguments

formula

Model formula

predictor

Predictor to check for, as character vector