node.paths | R Documentation |

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)

`tree` |
a phylogenetic tree. The tree needs not to be ultrametric and fully dichotomous. |

`vec` |
a vector of node numbers |

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.

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)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.