]> git.donarmstrong.com Git - ape.git/blobdiff - R/makeLabel.R
changed rtree and rcoal
[ape.git] / R / makeLabel.R
index 9d38dc1d2261f8579c7e7aa896bfa510ad4eb5f9..e51b65420b8f334d645e5588dd3bf0c64fd5aae8 100644 (file)
@@ -52,12 +52,12 @@ makeLabel.phylo <- function(x, tips = TRUE, nodes = TRUE, ...)
 
 makeLabel.multiPhylo <- function(x, tips = TRUE, nodes = TRUE, ...)
 {
-    y <- attr("TipLabel", x)
+    y <- attr(x, "TipLabel")
     if (is.null(y)) {
         for (i in 1:length(x))
             x[[i]] <- makeLabel.phylo(x[[i]], tips = tips, nodes = nodes, ...)
     } else {
-        attr("TipLabel", x) <- makeLabel.character(y, ...)
+        attr(x, "TipLabel") <- makeLabel.character(y, ...)
     }
     x
 }