powered by
hc2Newick(hc, flat=TRUE)
flat=TRUE
If flat=FALSE the result is a list (of lists). Each list is consituted of the elements left, right and dist.
flat=FALSE
left
right
dist
data(USArrests) h = hclust(dist(USArrests)) write(hc2Newick(h),file='hclust.newick')
Run the code above in your browser using DataLab