idMatches | R Documentation |
Identify nodes with matching descendant taxa between two phylogenies.
idMatches(tree1, tree2, least.inclusive = TRUE)
tree1 |
The first tree. |
tree2 |
The second tree. |
least.inclusive |
Do you want to keep the smallest or largest set of matched taxa. See details. |
If there are multiple nodes in tree 2 which could potentially be mapped to a node in tree 1, do you want to keep the smallest or the largest one? for example: ((A,B),Z) vs (((A,B),Z),C), where C doesn't occur in tree 1. Do you want the matched node from tree 2 to be A,B,Z or A,B,Z,C.
Eliot Miller
first <- sim.bdtree(n=50)
second <- sim.bdtree(n=1000)
third <- sim.bdtree(n=2000)
#always returns equivalent no matter which tree is first if you set it to least inclusive = TRUE
system.time(test <- idMatches(first,second))
system.time(test2 <- idMatches(second,first))
setequal(test[,1], test2[,2])
setequal(test[,2], test2[,1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.