tree_idx: return path index

View source: R/0-util-functions.R

tree_idxR Documentation

return path index

Description

return path index

Usage

tree_idx(path, tree, complete = FALSE)

Arguments

path

a path from root in the tree.

tree

a symmetric tree given as a list of levels.

complete

logical, if TRUE the complete indexing is returned.

Details

Compute the integer index of the node associated with the given path in a symmetric tree defined by tree.

Value

an integer, the index of the node corresponding to path


stagedtrees documentation built on April 29, 2022, 1:06 a.m.