X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=R%2Fmrca.R;h=4583bae24ea9797dd4d1d11acb042b8a5e7ed1e7;hb=bfaeca35ec130110327a3bb7a1f0fe3b66076a95;hp=4464672c5a343ccbbe30a4efc9932daea1194256;hpb=c827059eeafc8cbe41c812b26979543ab287803e;p=ape.git diff --git a/R/mrca.R b/R/mrca.R index 4464672..4583bae 100644 --- a/R/mrca.R +++ b/R/mrca.R @@ -1,15 +1,15 @@ -## mrca.R (2006-10-12) +## mrca.R (2009-05-10) ## Find Most Recent Common Ancestors Between Pairs -## Copyright 2005-2006 Emmanuel Paradis +## Copyright 2005-2009 Emmanuel Paradis ## This file is part of the R-package `ape'. ## See the file ../COPYING for licensing issues. mrca <- function(phy, full = FALSE) { - if (class(phy) != "phylo") stop('object "phy" is not of class "phylo"') + if (!inherits(phy, "phylo")) stop('object "phy" is not of class "phylo"') ## if (!is.rooted(phy)) stop("the tree must be rooted.") ## Get all clades: nb.tip <- length(phy$tip.label)