View source: R/derivationTrees.R
treeSize | R Documentation |
treeSize()
returns the number of symbols in a
derivation tree.
treeSize(tree)
tree |
Derivation tree. |
Integer. Number of symbols in a derivation tree.
Other Measures of Tree Attributes:
treeLeaves()
,
treeListDepth()
,
treeNodes()
,
treeProbability()
g<-compileBNF(booleanGrammar())
a<-randomDerivationTree(g$Start, g)
treeSize(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.