% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/m2dt_utils.R
\name{get_model_data}
\alias{get_model_data}
\title{Get data from model object (works with S3 and S4)}
\usage{
get_model_data(model)
}
\arguments{
\item{model}{Fitted model object (S3 or S4).}
}
\value{
Data frame or data.table used to fit the model, or \code{NULL} if unavailable.
}
\description{
Retrieves the original data used to fit a model. Checks multiple locations
including model attributes, $data slot, $model slot, and @frame for S4.
}
\keyword{internal}
