nodeGroups {MSCquartets} | R Documentation |
Groups taxa by deleting a node in a tree
Description
Finds groups of taxa determined by the connected components of the graph resulting from deleting an internal node in a tree.
Usage
nodeGroups(tree, nodeNum)
Arguments
tree |
a tree, of class "phylo" |
nodeNum |
a node number, representing an internal node in the phylo representation |
Details
When applied to a rooted tree, the last group returned is the set of tips that are non-descendants of the node (provided any exist).
Value
a list of lists of tree tip numbers for each group. The union of the groups is the set of all tips.
Examples
tree=read.tree(text="((a,b),((c,d,e),(f,g)));")
nodeGroups(tree,8)
nodeGroups(tree,10)
nodeGroups(tree,11)
[Package MSCquartets version 2.0 Index]