View source: R/supporting_tips.R
supporting.tips | R Documentation |
For a given tree and a given node of this tree, this function outputs all pairs (or more if polytomies) of tips whose MRCA (most recent common ancestor) is that node of that tree
supporting.tips(tree,node,out=c("list","comb"),out.collapse=" - ",mandatory=FALSE)
tree |
Phylogenetic tree to consider |
node |
Node to consider. Can be the node number (from 1 to the number of nodes, or from the number of tips +1 to the number of tips + number of nodes) |
out |
The type of output. Can be a list (if |
out.collapse |
The way to collate tip labels if a vector is desired as output. Default is set to |
mandatory |
Logical, whether "mandatory tips" (tips always found to structure the node, likely one of the direct daugher taxa of the given node) should be returned. Default to |
require(ape)
# Get a random tree of 20 tips
set.seed(1)
tree<-rtree(20)
plot(tree)
nodelabels()
# To see which node is "structuring" the node 27
supporting.tips(tree,27)
# Same with the vectorized output
supporting.tips(tree,27,"comb")
# One of the direct daughter taxa of the node 27 is the taxon t17, so it is a "mandatory" tip (i.e., always in the combinations)
supporting.tips(tree,27,mandatory=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.