midpoint
performs midpoint rooting of a tree.
pruneTree
produces a consensus tree.midpoint(tree)
pruneTree(tree, ..., FUN = ">=")
getRoot(tree)
phylo
pruneTree
and midpoint
a tree. getRoot
returns the root node.pruneTree
prunes back a tree and produces a consensus tree, for trees already containing nodelabels.
It assumes that nodelabels are numerical or character genereated from numericals, it uses as.numeric(as.character(tree$node.labels))
to convert them.
midpoint
so far does not transform node.labels properly.consensus
, root
, di2multi
tree = unroot(rtree(10))
tree$node.label = c("", round(runif(tree$Nnode-1), 3))
tree2 = midpoint(tree)
tree3 = pruneTree(tree, .5)
par(mfrow = c(3,1))
plot(tree, show.node.label=TRUE)
plot(tree2, show.node.label=TRUE)
plot(tree3, show.node.label=TRUE)
Run the code above in your browser using DataLab