ancestor: Find the ancestral nodes of a node

Description Usage Arguments Value Author(s) See Also Examples

Description

The function returns the ancestral nodes of inode including inode itself.

Usage

1
ancestor(inode, nodematrix)

Arguments

inode

the node number

nodematrix

the tree node matrix. it must be a rooted tree.

Value

The function returns a vector of ancestoral nodes of inode including inode itself.

Author(s)

Liang Liu lliu@uga.edu

See Also

mrca.2nodes, mrca.nodes

Examples

1
2
3
treestr<-"((((H:0.00402,C:0.00402):0.00304,G:0.00706):0.00929,O:0.01635):0.1,W:0.11635);"
nodematrix<-read.tree.nodes(treestr)$nodes
ancestor(6,nodematrix)

bomeara/phybase documentation built on May 12, 2019, 11:35 p.m.