Its a very basic question, unfortunately I do not know how to ask it. Lets say I have the following code for clustering using hclust:
hc <- hclust(dist(USArrests), "ave")
s = cutree(hc,k=2)
Lets assume sort(s)
gives the following result:
Alabama Alaska Arizona Delaware Florida
1 1 1 2 2
How can I get Alabama Alaska Arizona Delaware Florida
in a list without the bottom cluster number getting appended to it.