]> git.donarmstrong.com Git - ape.git/blobdiff - R/is.ultrametric.R
various bug fixes
[ape.git] / R / is.ultrametric.R
index 76abc58503889c55cfff9ba951569826e9b671c1..ae4c43937ea6f08ea6a8cae0afcf7d40a684195a 100644 (file)
@@ -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.")