% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/m2dt_utils.R
\name{parse_term}
\alias{parse_term}
\title{Parse term into variable and group}
\usage{
parse_term(terms, xlevels = NULL, model = NULL)
}
\arguments{
\item{terms}{Character vector of coefficient term names.}

\item{xlevels}{Named list of factor levels from the model.}

\item{model}{Optional model object for extracting factor info from coxme models.}
}
\value{
Data.table with 'variable' and 'group' columns.
}
\description{
Splits coefficient term names into base variable names and factor levels.
For example, "sexMale" becomes variable="sex" and group="Male".
Handles interaction terms and continuous variables appropriately.
}
\keyword{internal}
