Hi,
This worked:
fit <- hclust(d, method="ward")
library(ape)
p <- (as.phylo(fit))
write.tree(p, file="MyNewick.tre")
Cheers,
J
--
View this message in context:
http://r.789695.n4.nabble.com/Hclust-tree-to-Figtree-w-branch-lengths-tp4655990p4656057.html
Sent from the R help mailing list arch
Hi,
I'm doing hierarchical clustering, and want to export my dendrogram to a
tree-viewing/editing software. I can do this by converting the data to
Newick format (hc2Newick in ctc package), but I can't get branch lengths to
show in the resulting phylogram. I figured it might help to convert my
hcl
2 matches
Mail list logo