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) 
 	


Search within the BMhyd package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.