-## read.tree.R (2010-09-27)
+## read.tree.R (2012-09-14)
## Read Tree Files in Parenthetic Format
-## Copyright 2002-2010 Emmanuel Paradis, Daniel Lawson and Klaus Schliep
+## Copyright 2002-2012 Emmanuel Paradis, Daniel Lawson and Klaus Schliep
## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
if (any(nzchar(node.label))) obj$node.label <- node.label
if (!is.na(root.edge)) obj$root.edge <- root.edge
class(obj) <- "phylo"
+ attr(obj, "order") <- "cladewise"
obj
}
## is a bifurcation at the root
ROOT <- length(obj[[i]]$tip.label) + 1
if(sum(obj[[i]]$edge[, 1] == ROOT) == 1 && dim(obj[[i]]$edge)[1] > 1)
- stop(paste("There is apparently two root edges in your file: cannot read tree file.\n Reading Newick file aborted at tree no.", i, sep = ""))
+ stop(paste("The tree has apparently singleton node(s): cannot read tree file.\n Reading Newick file aborted at tree no.", i))
}
if (Ntree == 1 && !keep.multi) obj <- obj[[1]] else {
if (!is.null(tree.names)) names(obj) <- tree.names