Thanks to Emmanuel for adding the equiprob=TRUE option to multi2di. However, I’m not convinced that it’s working correctly - I still get more balanced trees than unbalanced trees in ape 5.4.1
> library(phytools) > library(phangorn) > library(ape) > packageVersion("ape") [1] '5.4.1' > reps <- do.call(c, lapply(1:100000, function(x) + multi2di(starTree(c('a','b','c','d')), equiprob=TRUE))) > balanced = read.tree(text="((a,c),(b,d));”) # test one of 15 4-tomy > resolutions > test <- sapply(reps, function(x) RF.dist(x, balanced, rooted=TRUE) == 0) > mean(test) # should be ~ 1/15 ~ 0.0667 [1] 0.16625 By the way, there is a spelling mistake on the ape homepage too ("ape souce code” - is missing an “r” in “source”). Cheers Yan [[alternative HTML version deleted]] _______________________________________________ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/