Description Usage Arguments Details Value Author(s) See Also Examples
This function adds tips (terminal nodes) to a (currently ultrametric) phylogenetic tree.
1 |
phy |
an object of class |
tip |
a character string giving the name of the species to be added. |
tax |
a data frame containing a taxonomy. |
insert |
a character string indicating the positions where the species is to be inserted: |
stem.edge |
a real number greater than 0 and smaller than 1, which gives the fraction of the terminal branch length that will be assigned to the branch subtending the newly created MRCA of |
tip
will be added at the crown group level of the genus. This means there must be a monophyletic generic clade in the phylogeny that matches the genus name of tip
an object of class phylo
containing at least one multichotomous node.
Christoph Heibl
prune.phylo.rank
for pruning phylogenies to a particular taxonomic level.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## random ultrametric tree
## -----------------------
#set.seed(12)
#phy <- rcoal(20, tip.label = paste("whale", LETTERS[1:20]))
#phy$tip.label[6:9] <- gsub("whale", "humpback", phy$tip.label[6:9])
#phy$tip.label[12] <- gsub("whale", "humpback", phy$tip.label[12])
#phy <- fixNodes(ladderize(phy))
#plot(phy, no.margin = TRUE); nodelabels(cex = .5)
## default use adding four species
## -------------------------------
#spec <- c("Athelia V",
# paste("Cladonia", c("X", "Y", "Z")))
#phy.crown <- phy
#for (i in seq_along(spec))
# phy.crown <- addTip(phy.crown, spec[i])
#plot(phy.crown, no.margin = TRUE); nodelabels(cex = .5)
## random addition of tips to their genus
## ---------------------------------------
#spec <- paste("Cladonia", c("X", "Y", "Z"))
#phy.random <- phy
#for (i in seq_along(spec))
# phy.random <- addTip(phy.random, spec[i], insert = "randomly")
#plot(phy.random, no.margin = TRUE); nodelabels(cex = .5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.