squeeze_tips | R Documentation |
This function slices a phylogenetic tree in a 'tipward' orientation, starting from the tips and moving towards the root of the tree.
squeeze_tips(tree, time, criterion = "my", dropNodes = FALSE)
tree |
phylo. An ultrametric phylogenetic tree in the "phylo" format. |
time |
numeric. A value that determines the time, or accumulated phylogenetic diversity (PD), at which the tree should be cut. |
criterion |
character string. The method for cutting the tree. It can be either "my" (million years) or "PD" (accumulated phylogenetic diversity). Default is "my". |
dropNodes |
logical. A logical value indicating whether the nodes that were sliced (void nodes, presenting no branch length) should be preserved in the node matrix. Default is FALSE. |
Slicing approach The treesliceR package uses a simple approach for cutting phylogenies, which reduces branch lengths in relation to an inputted temporal threshold.
The function returns a time-slice of an inputted phylogenetic tree in the "phylo" format, following a 'tipward' orientation.
Matheus Lima de Araujo matheusaraujolima@live.com
See the tutorial on how to use this function on our website.
Other slicing methods: squeeze_root()
, squeeze_int()
, phylo_pieces()
, prune_tips()
.
# Generate a random tree
tree <- ape::rcoal(20)
# Slice "tipwardly" the phylogeny at 0.1 million years
tree <- squeeze_tips(tree, time = 0.1)
# Plot it
plot(tree)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.