Learn R Programming

Claddis (version 0.3.4)

EdgeMatch: Edge matching function

Description

Given two trees where one is a pruned version of the other gives matching edges and nodes of pruned tree to original tree.

Usage

EdgeMatch(original.tree, pruned.tree)

Arguments

original.tree

A tree in phylo format.

pruned.tree

A tree in phylo format that represents a pruned version of original.tree.

Value

matching.edges

A list of the matching edges.

matching.nodes

A matrix of matching node numbers.

removed.edges

A vector of the removed edges.

Details

Finds matching edge(s) and node(s) for a pruned tree in the original tree from which it was created. This is intended as an internal function, but may be of use to someone.

Examples

Run this code
# NOT RUN {
# Create a random 10-taxon tree:
original.tree <- rtree(10)

# Remove three leaves:
pruned.tree <- drop.tip(original.tree, c("t1", "t3", "t8"))

# Find matching edges:
X <- EdgeMatch(original.tree, pruned.tree)

# Show matching edges:
X$matching.edges

# Show removed edges:
X$removed.edges

# }

Run the code above in your browser using DataLab