# For gen.unit.K()
set.seed(1234)
tree.K <- gen.unit.K(6, rep(3:5, 2),
rate.anc = 0.7, rate.dec = 1.1)
X.class <- as.numeric(gsub("d(.)(.*)", "\\1",
tree.K$org$tip.label))
# Plot results
par(mfrow = c(2, 2))
plotnj(tree.K$org, X.class, type = "p",
edge.width.class = 2, main = "org")
axis(1)
plotnj(tree.K$equal, X.class, type = "p",
edge.width.class = 2, main = "equal")
axis(1)
plotnj(tree.K$max, X.class, type = "p",
edge.width.class = 2, main = "max")
axis(1)
plotnj(tree.K$star, X.class, type = "p",
edge.width.class = 2, main = "star")
axis(1)
Run the code above in your browser using DataLab