apply_to_models: Internal Function: Apply Function to Models in Nodes

View source: R/grmtree-applytomodels.R

apply_to_modelsR Documentation

Internal Function: Apply Function to Models in Nodes

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.

Usage

apply_to_models(object, node = NULL, FUN = NULL, drop = FALSE, ...)

Arguments

object

A grmtree object.

node

Vector of node IDs (default: all nodes).

FUN

Function to apply to each model.

drop

Logical indicating whether to drop list structure if length 1.

...

Additional arguments passed to FUN.

Value

List of results (or single result if drop=TRUE and length(node)=1).


grmtree documentation built on Sept. 2, 2026, 1:07 a.m.