X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=R%2Fwhich.edge.R;h=b6405927b8a56d4fbb1792a2219d4434e7cd5af1;hb=80d1c453d63d6aec18f0b731d59918b99e189d86;hp=0da0742247e2a4f1a4d895db51ecb188d782de65;hpb=c827059eeafc8cbe41c812b26979543ab287803e;p=ape.git diff --git a/R/which.edge.R b/R/which.edge.R index 0da0742..b640592 100644 --- a/R/which.edge.R +++ b/R/which.edge.R @@ -1,8 +1,8 @@ -## which.edge.R (2007-09-11) +## which.edge.R (2009-05-10) ## Identifies Edges of a Tree -## Copyright 2004-2007 Emmanuel Paradis +## Copyright 2004-2009 Emmanuel Paradis ## This file is part of the R-package `ape'. ## See the file ../COPYING for licensing issues. @@ -28,7 +28,7 @@ getMRCA <- function(phy, tip) which.edge <- function(phy, group) { - if (class(phy) != "phylo") + if (!inherits(phy, "phylo")) stop('object "phy" is not of class "phylo"') if (is.character(group)) group <- which(phy$tip.label %in% group)