]> git.donarmstrong.com Git - ape.git/blobdiff - R/ace.R
many changes.......
[ape.git] / R / ace.R
diff --git a/R/ace.R b/R/ace.R
index 0439600832a0f1018af4b75974ea11703f2a6e02..b45a88e2009cc5ee252c2e1e1246c6db0162423f 100644 (file)
--- a/R/ace.R
+++ b/R/ace.R
@@ -1,6 +1,6 @@
-## ace.R (2009-03-22)
+## ace.R (2009-05-10)
 
-##     Ancestral Character Estimation
+##   Ancestral Character Estimation
 
 ## Copyright 2005-2009 Emmanuel Paradis and Ben Bolker
 
@@ -11,7 +11,7 @@ ace <- function(x, phy, type = "continuous", method = "ML", CI = TRUE,
                 model = if (type == "continuous") "BM" else "ER",
                 scaled = TRUE, kappa = 1, corStruct = NULL, ip = 0.1)
 {
-    if (class(phy) != "phylo")
+    if (!inherits(phy, "phylo"))
       stop('object "phy" is not of class "phylo".')
     if (is.null(phy$edge.length))
         stop("tree has no branch lengths")