get_model_xlevels: Get factor levels from model (works with S3 and S4)

View source: R/m2dt_utils.R

get_model_xlevelsR Documentation

Get factor levels from model (works with S3 and S4)

Description

Extracts factor level information from fitted model objects. Handles both S3 models (glm, lm, coxph) via xlevels slot and S4 models (lme4) via the model frame.

Usage

get_model_xlevels(model)

Arguments

model

Fitted model object (S3 or S4).

Value

Named list of factor levels, or NULL if no factors present.


summata documentation built on May 7, 2026, 5:07 p.m.