]> git.donarmstrong.com Git - ape.git/blobdiff - R/dist.topo.R
many changes!
[ape.git] / R / dist.topo.R
index eb9ba6f81e6f0410d3b68d16c5d6335f4739ff7f..86b396b9aa9814abade98b2c5bd86c3f75fe25ee 100644 (file)
@@ -11,7 +11,7 @@
 dist.topo <- function(x, y, method = "PH85")
 {
     if (method == "score" && (is.null(x$edge.length) || is.null(y$edge.length)))
-        stop("trees must have branch lengths for Billera et al.'s distance.")
+        stop("trees must have branch lengths for branch score distance.")
     nx <- length(x$tip.label)
     x <- unroot(x)
     y <- unroot(y)
@@ -211,7 +211,10 @@ boot.phylo <- function(phy, x, FUN, B = 100, block = 1, trees = FALSE)
     storage.mode(phy$Nnode) <- "integer"
     ans <- attr(.Call("prop_part", c(list(phy), boot.tree),
                       B + 1, FALSE, PACKAGE = "ape"), "number") - 1
-    if (trees) ans <- list(BP = ans, trees = boot.tree)
+    if (trees) {
+        class(boot.tree) <- "multiPhylo"
+        ans <- list(BP = ans, trees = boot.tree)
+    }
     ans
 }