find_leaves_in_list: Find the leaves under a node

View source: R/find_leaves.R

find_leaves_in_listR Documentation

Find the leaves under a node

Description

This function finds all leaves that are descendants of a node in a tree (represented by an hc_list object).

Usage

find_leaves_in_list(ind, hc_list)

Arguments

ind

Index of a tree node.

hc_list

A list of length-num_interior_nodes where the ith item in the list contains the child nodes of the ith node in the tree. The negative values in the list indicate leaf nodes.

Value

Returns the leaf indices.

Examples

## See data example.

simone0628/hat documentation built on June 1, 2024, 9 a.m.