ancestors | R Documentation |
ancestors
finds all the ancestors of the given vertex within the tree starting from itself up to the root. least.common.ancestor
finds the common ancestor of two vertices that is closest to them (and farthest from the root).
ancestors(otree, vertex) least.common.ancestor(otree, v1, v2)
otree |
An object of class |
vertex, v1, v2 |
Character values giving the names of the nodes. |
For ancestors
: a character vector giving the names of the ancestors of vertex
. The first element is vertex
, and the last one is “Root”.
For least.common.ancestor
: a character value with the name of the least common ancestor of v1
and v2
.
oncotree.fit
data(ov.cgh) ov.tree <- oncotree.fit(ov.cgh) ancestors(ov.tree, "4q-") ancestors(ov.tree, "Xp-") least.common.ancestor(ov.tree, "4q-","Xp-") #"5q-"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.