Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/treeManipulation.R
midpoint
performs midpoint rooting of a tree. pruneTree
produces a consensus tree.
1 2 3 4 5 6 7 8 9 10 11 |
tree |
an object of class |
node.labels |
are node labels 'support' values (edges), 'label' or should labels get 'deleted'? |
... |
further arguments, passed to other methods. |
FUN |
a function evaluated on the nodelabels, result must be logical. |
pruneTree
prunes back a tree and produces a consensus tree, for trees
already containing nodelabels. It assumes that nodelabels are numerical or
character that allows conversion to numerical, it uses
as.numeric(as.character(tree$node.labels)) to convert them. midpoint
so far does not transform node.labels properly.
pruneTree
and midpoint
a tree. getRoot
returns
the root node.
Klaus Schliep klaus.schliep@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 | tree <- rtree(10, rooted = FALSE)
tree$node.label <- c("", round(runif(tree$Nnode-1), 3))
tree2 <- midpoint(tree)
tree3 <- pruneTree(tree, .5)
old.par <- par(no.readonly = TRUE)
par(mfrow = c(3,1))
plot(tree, show.node.label=TRUE)
plot(tree2, show.node.label=TRUE)
plot(tree3, show.node.label=TRUE)
par(old.par)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.