Learn R Programming

supernova (version 3.0.1)

normalize_term: Normalize an interaction term by sorting its components alphabetically. This ensures hp:disp and disp:hp are treated as the same term.

Description

This works because R interaction terms are commutative (a:b == b:a), but R's terms() function may reorder components alphabetically.

Usage

normalize_term(term)

Arguments