The easiest way is to use keep.order in terms.formula()
model <- y ~ a * b + c * d + e labels(terms(model, keep.order = TRUE)) # [1] "a" "b" "a:b" "c" "d" "c:d" "e"
To find the help file, you will want to use ?terms.formula , since this method is not shown in ?terms . But terms() will send the formula method. In addition, labels() is a shorthand way for getting terminal labels from terms() .
source share