## build and export tree for the woodmouse data (ape package)
library(ape)
data(woodmouse)
## trim gappy ends for global alignment
woodmouse <- woodmouse[, apply(woodmouse, 2, function(v) !any(v == 0xf0))]
## build topdown tree
set.seed(999)
x <- topdown(woodmouse, nstart = 20)
write.dendrogram(x, edges = TRUE)
Run the code above in your browser using DataLab