combMyTree | R Documentation |
Graft polytomies on the tips of a class phylo
object.
combMyTree(phy, data, brlen = 0, annotate = FALSE)
phy |
An object of class |
data |
A data frame containing two columns. The entries of one column must be identical to the tip labels of the phylogeny; the other column contains the new tip labels. The column are matched automatically. |
brlen |
A numeric giving the branch lengths for the polytomies. |
annotate |
Logical, if |
An object of class phylo
with nrow(data)
tips.
forceEqualTipHeights
data(ips.tree)
## Simulate varying number of intraspecific observations
s <- sapply(1:Ntip(ips.tree), sample, x = 1:3, size = 1)
x <- rep(ips.tree$tip.label, times = s)
x <- data.frame(x, paste0(x, unlist(lapply(s, function(z) 1:z))))
## Create polytomies
tre <- combMyTree(ips.tree, x)
plot(tre, no.margin = TRUE, cex =.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.