Description Usage Arguments Value Author(s) Examples
This functions binds a tip to an interior branch above a node, and creates a node.
1 |
phylogeny |
The phylogeny. |
location.node |
The number or label of the node above which the tip is to bind. |
tip.label |
The label of the tip to bind. |
node.label |
The label of the node created when binding the tip. The default is NULL. |
position |
The position on the interior branch to bind the new tip, the value must be > 0 and < 1, meaning the proportion of the interior branch length starts from location.node. The default is 0.5. |
phylogeny |
The updated phylogeny, with the tip binded. |
Yi Jin
1 2 3 4 5 6 | library(ape)
phylo0 <- rcoal(10) # generate a phylogeny with 10 tips
phylo <- int.node(phylogeny = phylo0, location.node = sample(phylo0$edge[, 1], 1), tip.label = "New Tip", node.label = NULL, position = 0.5) # bind a "New Tip" to the phylogeny to a branch above a random node.
par(mfrow = c(1, 2))
plot(phylo0) # plot the phylogeny.
plot(phylo) # plot the phylogeny with the "New Tip" binded.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.