X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=R%2Fsummary.phylo.R;h=f390b24d25bbb936331e26fea1e25aa51a45dd5a;hb=0d2caf41f13f7a3e8a313274cf819147940eac69;hp=bf01266aec96cc2c82d40fe7ff62c0f63b1fc83e;hpb=0875d81d5ba5e6dfe79d42c21b0284b674c73949;p=ape.git diff --git a/R/summary.phylo.R b/R/summary.phylo.R index bf01266..f390b24 100644 --- a/R/summary.phylo.R +++ b/R/summary.phylo.R @@ -1,8 +1,8 @@ -## summary.phylo.R (2010-05-25) +## summary.phylo.R (2011-08-04) ## Print Summary of a Phylogeny and "multiPhylo" operators -## Copyright 2003-2010 Emmanuel Paradis, and 2006 Ben Bolker +## Copyright 2003-2011 Emmanuel Paradis, and 2006 Ben Bolker ## This file is part of the R-package `ape'. ## See the file ../COPYING for licensing issues. @@ -70,18 +70,6 @@ summary.phylo <- function(object, ...) } } - if (!is.null(attr(object, "loglik"))) { - cat("Phylogeny estimated by maximum likelihood.\n") - cat(" log-likelihood:", attr(object, "loglik"), "\n\n") - npart <- length(attr(object, "para")) - for (i in 1:npart) { - cat("partition ", i, ":\n", sep = "") - print(attr(object, "para")[[i]]) - if (i == 1) next - else cat(" contrast parameter (xi):", - attr(object, "xi")[i - 1], "\n") - } - } } ### by BB: @@ -97,10 +85,10 @@ print.phylo <- function(x, printlen = 6,...) collapse=", "), ", ...\n", sep = "")) } else print(x$tip.label) if (!is.null(x$node.label)) { - cat("\tNode labels:\n") + cat("Node labels:\n") if (nb.node > printlen) { cat(paste("\t", paste(x$node.label[1:printlen], - collapse=", "), ",...\n", sep = "")) + collapse=", "), ", ...\n", sep = "")) } else print(x$node.label) } rlab <- if (is.rooted(x)) "Rooted" else "Unrooted" @@ -118,7 +106,6 @@ print.multiPhylo <- function(x, details = FALSE, ...) if (details) for (i in 1:N) cat("tree", i, ":", length(x[[i]]$tip.label), "tips\n") - cat("\n") } "[[.multiPhylo" <- function(x, i) @@ -158,8 +145,8 @@ c.multiPhylo <- function(..., recursive = FALSE) n <- length(obj) x <- obj[[1L]] N <- length(x) - i <- 1L - while (i < n) { + i <- 2L + while (i <= n) { a <- N + 1L N <- N + length(obj[[i]]) ## x is of class "multiPhylo", so this uses the operator below: