R/isClade.R

isClade <-
function(phy,taxonlist) {
	if (length(taxonlist)==1) {
		return(TRUE)
	}
	if(length(descendants(phy,MRCA(phy,taxonlist),type="tips"))==length(taxonlist)) {
		return(TRUE)
	}
	else {
		return(FALSE)
	}
}
bomeara/utilitree documentation built on May 12, 2019, 11:37 p.m.