treeListDepth: Measures the depth of a (nested) list.

View source: R/derivationTrees.R

treeListDepthR Documentation

Measures the depth of a (nested) list.

Description

treeListDepth() returns the depth of a nested list. For a derivation tree, this is approximately twice the derivation depth.

Usage

treeListDepth(t, tDepth = 0)

Arguments

t

List.

tDepth

Integer. List depth. Default: 0.

Value

Depth of a nested list.

See Also

Other Measures of Tree Attributes: treeLeaves(), treeNodes(), treeProbability(), treeSize()

Examples

g<-compileBNF(booleanGrammar())
a<-randomDerivationTree(g$Start, g)
treeListDepth(a) 


xegaDerivationTrees documentation built on April 16, 2025, 5:11 p.m.