if (FALSE) {
library(phyclust, quiet = TRUE)
set.seed(1234)
ret.ms <- ms(nsam = 24, opts = "-T -G 0.5")
tree.anc <- read.tree(text = ret.ms[3])
is.rooted(tree.anc)
tree.new <- as.star.tree(tree.anc)
X.class <- rep(1:6, each = 4)
par(mfrow = c(2, 2))
plotnj(tree.anc, X.class, type = "u", edge.width.class = 2,
main = "unrooted tree")
plotnj(tree.new, X.class, type = "u", edge.width.class = 2,
main = "star tree")
plotnj(tree.anc, X.class, type = "c", edge.width.class = 2,
main = "unrooted tree in cladogram")
plotnj(tree.new, X.class, type = "r", edge.width.class = 2,
main = "star tree in radial")
}
Run the code above in your browser using DataLab