Description Usage Arguments Details Value Author(s) See Also Examples
Prunes or cuts an object of class "treeshape"
from a specificed internal node, either by specifying a top or bottom direction. This function returns either the top part or the bottom part of a tree.
1 | cutreeshape(tree, node, type)
|
tree |
An object of class |
node |
An integer representing the node at which the tree will be pruned or cut. |
type |
A character string equals to either |
If the type
argument is "top", the tree is pruned from node
. The resulting tips correspond to the ancestral branches present at the same height as the given node. New tip labels are assigned to the tips.
If the type
specified is "bottom", the subtree under node
is returned. The tips are not renamed (they keep their former names) and the specified node
is the root of the new tree.
An object of class "treeshape"
Michael Blum <michael.blum@imag.fr>
Nicolas Bortolussi <nicolas.bortolussi@imag.fr>
Eric Durand <eric.durand@imag.fr>
Olivier Francois <olivier.francois@imag.fr>
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Data set provided with the library. Type help(cytochromc) for more infos.
data(carnivora.treeshape)
data(hivtree.treeshape)
## Examples of "bottom" cutting:
bottom.tree=cutreeshape(carnivora.treeshape, 3, "bottom")
plot(carnivora.treeshape, bottom.tree)
bottom.tree=cutreeshape(carnivora.treeshape, 8, "bottom")
plot(carnivora.treeshape, bottom.tree)
## Examples of "top" pruning:
top.tree=cutreeshape(hivtree.treeshape, 158, "top")
plot(hivtree.treeshape, top.tree)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.