powered by
Given a vector of nodes, the function collates nodes along individual lineages from the youngest (i.e. furthest from the tree root) to the oldest.
node.paths(tree, vec)
A list of node paths, each starting from the youngest node (i.e. furthest from the tree root) and ending to the oldest along the path.
a phylogenetic tree. The tree needs not to be ultrametric and fully dichotomous.
a vector of node numbers
Silvia Castiglione, Pasquale Raia
require(ape) rtree(100)->tree sample(seq(Ntip(tree)+1,Ntip(tree)+Nnode(tree)),20)->nods plot(tree,show.tip.label=FALSE) nodelabels(node=nods,frame="n",col="red") node.paths(tree=tree, vec=nods)
Run the code above in your browser using DataLab