X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=R%2Fbalance.R;h=37b2671e0645e5641a93a00074f8bdda1aa7bd9a;hb=eccd02caa284c933ccabf54c2b52d2c871cbd8e8;hp=ebcc8d6cc40e8fdf9f8f4dff9e44d0c67e44b511;hpb=c827059eeafc8cbe41c812b26979543ab287803e;p=ape.git diff --git a/R/balance.R b/R/balance.R index ebcc8d6..37b2671 100644 --- a/R/balance.R +++ b/R/balance.R @@ -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