-## 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.
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