R: Number of trees containing a tree

TreesMatchingTree {TreeTools} | R Documentation

## Number of trees containing a tree

### Description

`TreesMatchingTree()` calculates the number of unrooted binary trees that are consistent with a tree topology on the same leaves.

### Usage

    TreesMatchingTree(tree)

    LnTreesMatchingTree(tree)

    Log2TreesMatchingTree(tree)

### Arguments

`tree` | A tree of class `phylo`.

### Details

Remember to unroot a tree first if the position of its root is arbitrary.

### Value

`TreesMatchingTree()` returns a numeric specifying the number of unrooted binary trees that contain all the edges present in the input tree.

`LnTreesMatchingTree()` gives the natural logarithm of this number.

### Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

### See Also

Other tree information functions: `CladisticInfo()`, `NRooted()`

### Examples

    partiallyResolvedTree <- CollapseNode(BalancedTree(8), 12:15)
    TreesMatchingTree(partiallyResolvedTree)
    LnTreesMatchingTree(partiallyResolvedTree)

    # Number of rooted trees:
    rootedTree <- AddTip(partiallyResolvedTree, where = 0)
    TreesMatchingTree(partiallyResolvedTree)

[Package TreeTools version 1.7.2 Index]