]> git.donarmstrong.com Git - ape.git/blobdiff - R/balance.R
various fixes and small news
[ape.git] / R / balance.R
index ebcc8d6cc40e8fdf9f8f4dff9e44d0c67e44b511..37b2671e0645e5641a93a00074f8bdda1aa7bd9a 100644 (file)
@@ -1,8 +1,8 @@
-## balance.R (2006-10-04)
+## balance.R (2009-05-10)
 
 ##   Balance of a Dichotomous Phylogenetic Tree
 
-## Copyright 2002-2006 Emmanuel Paradis
+## Copyright 2002-2009 Emmanuel Paradis
 
 ## This file is part of the R-package `ape'.
 ## See the file ../COPYING for licensing issues.
@@ -10,7 +10,7 @@
 balance <- function(phy)
 {
 ### the tree must be in cladewise order
-    if (class(phy) != "phylo")
+    if (!inherits(phy, "phylo"))
       stop('object "phy" is not of class "phylo"')
     N <- length(phy$tip.label)
     nb.node <- phy$Nnode