X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=R%2Fis.ultrametric.R;h=ae4c43937ea6f08ea6a8cae0afcf7d40a684195a;hb=0875d81d5ba5e6dfe79d42c21b0284b674c73949;hp=76abc58503889c55cfff9ba951569826e9b671c1;hpb=fc029e0a1be9a5bd338c941b00842cfad95c0336;p=ape.git diff --git a/R/is.ultrametric.R b/R/is.ultrametric.R index 76abc58..ae4c439 100644 --- a/R/is.ultrametric.R +++ b/R/is.ultrametric.R @@ -1,4 +1,4 @@ -## is.ultrametric.R (2009-03-09) +## is.ultrametric.R (2009-05-10) ## Test if a Tree is Ultrametric @@ -9,7 +9,7 @@ is.ultrametric <- function(phy, tol = .Machine$double.eps^0.5) { - if (class(phy) != "phylo") + if (!inherits(phy, "phylo")) stop('object "phy" is not of class "phylo".') if (is.null(phy$edge.length)) stop("the tree has no branch lengths.")