powered by
Finds groups of taxa determined by the connected components of the graph resulting from deleting an internal node in a tree.
nodeGroups(tree, nodeNum)
a list of lists of tree tip numbers for each group. The union of the groups is the set of all tips.
a tree, of class "phylo"
a node number, representing an internal node in the phylo representation
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).
tree=read.tree(text="((a,b),((c,d,e),(f,g)));") nodeGroups(tree,8) nodeGroups(tree,10) nodeGroups(tree,11)
Run the code above in your browser using DataLab