[R] How to extract text contexts after clustering.

θ ” yarmi1224 at hotmail.com
Mon May 22 04:33:45 CEST 2017


hi:
I need to extract the text contexts of top 1 group after clustering.
But I have no idea how to sort the cluster size then extract the contexts of top 1 clusters.

here is my cluster code:

> file <- read.csv("SiC CMP.csv", header = TRUE)
> cluster_k<-length(unique(file$Main.IPC))
> cl <- kmeans(IPC_Dtm , cluster_k)


I have tried use¡õ

> sort(cl$size, decreasing=T)
 [1] 341 107 104  80  51  22  15  11  10   8   8   5   5   5   4   4   4   3   3   2   2
[22]   2   2   2   2   2   2   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
[43]   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1

But I have no idea how to extract the contexts of top 1 cluster.


Eva

	[[alternative HTML version deleted]]



More information about the R-help mailing list