# NOT RUN {
library('TreeTools', quietly = TRUE, warn.conflicts = FALSE)
tenTrees <- as.phylo(1:10, nTip = 8)
# Default settings:
median(tenTrees)
# Robinson-Foulds distances include ties:
median(tenTrees, Distance = RobinsonFoulds, breakTies = FALSE)
# Be sure to use a distance function, rather than a similarity:
NyeDistance <- function (...) NyeSimilarity(..., similarity = FALSE)
median(tenTrees, Distance = NyeDistance)
# To analyse a list of trees that is not of class multiPhylo:
treeList <- lapply(1:10, as.phylo, nTip = 8)
class(treeList)
median(structure(treeList, class = 'multiPhylo'))
# }
Run the code above in your browser using DataCamp Workspace