Hi, Thanks for reply but I already read the help page I am new in R and did not understand the output description of kmeans -function. That is why I wanted to ask some experts in the group.
My point is that I do not understand which data are combined in the specific cluster? I tried the following : (kmeans.results <- kmeans(mydata,centers =4, iter.max= 1000, nstart =10000)) # The output data type is logical , cl1 is the cluster 1 cl1 <- data.frame(as.numeric(kmeans.results$cluster == 1)) nbcl1 <- sum (cl1, na.rm = 1) #output of the number of cl1 logical 1 values is for example 22 #this means there are 22 vectors which are similar but when I call : mydata[kmeans.results$cluster==1,] I only get 1 vector not 22 vectors that are in the cluster 1. I thought in the cluster 1 there are many vectors that are similar based on kmeans -function. But the output is only one vector! -- View this message in context: http://r.789695.n4.nabble.com/K-means-results-understanding-tp4670171p4670187.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.