GetAncestor: Identify the ancestor

Description Usage Arguments Value Author(s) References Examples

Description

Given the descedent node for the tree, the function will return its ancestor node.

Usage

1
2
	GetAncestor(phy, node)
	

Arguments

phy

an object of class 'phylo'.

node

descedant node.

Value

the ancestor node

Author(s)

Brian O'Meara, Dwueng-Chwuan Jhwueng.

References

Jhwueng D.C. and O'Meara B.C. 2015. Studying trait evolution in hybrid species on phylogenetic networks. Submitted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
	library(ape)
	#simulate a tree of 3 taxa
 	phy<-rtree(3)
 	#plot the tree
 	plot(phy) 
 	#descedant node
 	node<-1
 	#get the ancestor node, it will return 5.
 	GetAncestor(phy,node) 
 	

BMhyd documentation built on May 2, 2019, 8:27 a.m.

Related to GetAncestor in BMhyd...