]> git.donarmstrong.com Git - ape.git/blobdiff - R/rotate.R
final packing for ape 2.7
[ape.git] / R / rotate.R
index 520d677d8d96369cdc8ba953d6fd432f62757018..9a59d96262aac42439ff101f4ad1cd05a9034238 100644 (file)
@@ -28,7 +28,7 @@ rotate <- function(phy, node, polytom = c(1,2)){
                }
 # function starts here 
 # definitions
-       if (class(phy) != "phylo") # is phy of class phylo?
+       if (!inherits(phy, "phylo")) # is phy of class phylo?
         stop("object \"phy\" is not of class \"phylo\"")
     nb.tips <- length(phy$tip.label) # number of tiplabels
        max.int.node <- phy$Nnode+nb.tips # number of last internal node