GetClade: Get clade from the tree

Description Usage Arguments Details Value Author(s) References Examples

View source: R/bmhyb.r

Description

Search and report the nodes of the tree that have the desired clade size.

Usage

1
2
	GetClade(phy, clade.size)
	

Arguments

phy

an object of class 'phylo'.

clade.size

size of the clade.

Details

This function uses the 'phylo' class where the edges(ancestor-descendant relationship) of the tree are used to identify the interior node with desired number of descendent (clade.size) on the tips. It applies the function findMRCA in phytools to search the ancestor.

Value

the interior node that has descendants of size clade.size on the tip.

Author(s)

Brian O'Meara, Dwueng-Chwuan Jhwueng.

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
	library(ape)
	library(phytools)
	#simulate a tree
 	phy<-rtree(3)
 	#plot the tree
 	plot(phy)
 	#set up the clade size
 	clade.size<-2
 	#search the nodes that has desired clade size
 	GetClade(phy,clade.size) #node 5 will be return
 	

bomeara/BMhyb documentation built on Oct. 8, 2017, 9:45 a.m.