getRoot

0th

Percentile

Tree manipulation

midpoint performs midpoint rooting of a tree. pruneTree produces a consensus tree.

Keywords
cluster
Usage
getRoot(tree)

midpoint(tree, node.labels = "support", ...)

# S3 method for phylo midpoint(tree, node.labels = "support", ...)

# S3 method for multiPhylo midpoint(tree, node.labels = "support", ...)

pruneTree(tree, ..., FUN = ">=")

Arguments
tree

an object of class phylo

node.labels

are nodel labels 'support' values, 'label' or should be 'deleted'

further arguments, passed to other methods.

FUN

a function evaluated on the nodelabels, result must be logical.

Details

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.

Value

pruneTree and midpoint a tree. getRoot returns the root node.

See Also

consensus, root, multi2di

Aliases
  • getRoot
  • midpoint
  • midpoint.phylo
  • midpoint.multiPhylo
  • pruneTree
Examples
# NOT RUN {
tree <- rtree(10, rooted = FALSE)
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)

# }
Documentation reproduced from package phangorn, version 2.5.5, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.