powered by
Gets the list of ancestors (parents) from a tip or a node (modified from getParent)
getParent
get.ancestors(tip, tree, full = TRUE)
A tip (or node) index.
A tree topology of class "phylo".
"phylo"
Whether to output the direct ancestor only (FALSE) or the full list of ancestors to the root (TRUE - default)
FALSE
TRUE
A integer vector of ancestor(s).
integer
ancestral.dist, nodes.coordinates, getParent
ancestral.dist
nodes.coordinates
# NOT RUN { ## A random tree tree <- rtree(10) ## Get the ancestors of the first tip get.ancestors(1, tree) # }
Run the code above in your browser using DataLab