Hello list, the following approach did not work:
clustersA <- pam(distances, nkA, diss=TRUE); gc(); filenameclu = paste("filenameclu", ".txt"); write.table(clustersA , file=filenameclu,sep=","); although it worked with clustersA <- hclust(distances, method="ward"); and a consecutive kclassA <- cutree(clustersA, k=nkA); filename = paste("clusters", ".txt"); write.table(kclassA,file=filename,sep=",",col.names=TRUE,row.names=TRUE); Is there a <em>generic</em> method to export cluster object? I know that pam is different (cluster object and some more data)- how can I extract & export the clustering into a table with two columns, ID = dissimilarity matrix row, and cluster = number of the cluster? I waas using sink to get the data, but for large matrices it involves a huge amount of manual formatting afterwards, let's say in excel. Thanks many times Martin ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.