Learn R Programming

biometryassist (version 1.4.0)

check_classify_in_terms: Check if classify term exists in model terms

Description

Checks if the classify term exists in the model terms, handling interaction terms specified in any order (e.g., B:A when model has A:B, or A:C:B when model has A:B:C).

Usage

check_classify_in_terms(classify, model_terms)

Value

The classify term as it appears in the model (potentially reordered), or throws an error if not found

Arguments

classify

Name of predictor variable as a string

model_terms

Character vector of model term labels