combMyTree {ips} | R Documentation |
Graft Polytomies on Tips of Phylogeny
Description
Graft polytomies on the tips of a class phylo
object.
Usage
combMyTree(phy, data, brlen = 0, annotate = FALSE)
Arguments
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 |
Value
An object of class phylo
with nrow(data)
tips.
See Also
Examples
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)
[Package ips version 0.0.12 Index]