View source: R/checkAndFixUltrametric.R
checkAndFixUltrametric | R Documentation |
checkAndFixUltrametric
finds and correct small numerical errors that
might appear in ultrametric trees that where created through simulations.
This function should never be used as a formal statistical method to make a
tree ultrametric, as it was designed just to correct small rounding errors.
checkAndFixUltrametric(phy)
phy |
A |
A check and fixed phylo
object.
Daniel Rabosky, Matheus Januario, Jennifer Auler
Paradis, E. (2012). Analysis of Phylogenetics and Evolution with R (Vol. 2). New York: Springer.
Popescu, A. A., Huber, K. T., & Paradis, E. (2012). ape 3.0: New tools for distance-based phylogenetics and evolutionary analysis in R. Bioinformatics, 28(11), 1536-1537.
S <- 1
E <- 0
set.seed(1)
phy <- simulateTree(pars = c(S, E), max.taxa = 6, max.t = 5)
phy$edge.length[1] <- phy$edge.length[1]+0.1
ape::is.ultrametric(phy)
phy <- checkAndFixUltrametric(phy)
ape::is.ultrametric(phy)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.