Description Usage Arguments Value Author(s) Examples
This functions binds a tip to a terminal branch in a phylogeny, and creates a node.
1 |
phylogeny |
The phylogeny. |
location.tip |
The number or label of the tip of the terminal branch. |
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 terminal branch to bind the tip, the value must be > 0 and < 1, meaning the proportion of the terminal branch length starts from the tip. The default is 0.5. |
phylo |
The 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 <- ext.node(phylogeny = phylo0, location.tip = sample(1:10, 1), tip.label = "New Tip", node.label = NULL, position = 0.5) # bind a "New Tip" to a random terminal branch.
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.