title: Exporting hclust cluster membership
body: <p>I am new to R. I am trying to do hclust and export the cluster membership. I have used the following. Is this correct or is there a better way?</p>
  
  <pre><code>FCtable1&lt;-as.matrix(read.delim("table1.txt", row.names=1, header=TRUE, sep="\t"))
  Disttab1&lt;-dist(FCtable1, method="euclidean")
  Hclustout1&lt;-hclust(Disttab1, method="average")
  clustnumber&lt;- cutree(Hclustout1, h=1000)
  tab1clustn &lt;-data.frame(FCtable1, clustnumber)
  write.table(tab1clustn,  file=" tab1clustn.xls", row.names=T, sep="\t")
  </code></pre>
  
  <p>Thanks
  R</p>