X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=R%2Fbranching.times.R;h=509fd83cddf450545c7ca5ef5c67df2f90a5a336;hb=0875d81d5ba5e6dfe79d42c21b0284b674c73949;hp=38c27dfffa71571f21b27cb1a00cfb25e633e827;hpb=c827059eeafc8cbe41c812b26979543ab287803e;p=ape.git diff --git a/R/branching.times.R b/R/branching.times.R index 38c27df..509fd83 100644 --- a/R/branching.times.R +++ b/R/branching.times.R @@ -1,8 +1,8 @@ -## branching.times.R (2006-10-04) +## branching.times.R (2009-05-10) ## Branching Times of a 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 @@ branching.times <- 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) N <- dim(phy$edge)[1]