% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grmtree-applytomodels.R
\name{apply_to_models}
\alias{apply_to_models}
\title{Internal Function: Apply Function to Models in Nodes}
\usage{
apply_to_models(object, node = NULL, FUN = NULL, drop = FALSE, ...)
}
\arguments{
\item{object}{A \code{grmtree} object.}

\item{node}{Vector of node IDs (default: all nodes).}

\item{FUN}{Function to apply to each model.}

\item{drop}{Logical indicating whether to drop list structure if length 1.}

\item{...}{Additional arguments passed to FUN.}
}
\value{
List of results (or single result if drop=TRUE and length(node)=1).
}
\description{
Applies a function to the GRM models in specified nodes of a tree.
This is an internal helper function and not meant to be called directly.
}
\keyword{internal}
