Dear R user,

Can you please
help me. How do I convert part of a cluster analysis output under the heading 
“Clustering
vector” as shown below, showing the clusters to which each respondent belongs
to:

 

   [1] 1 1 2 2 1 2 1 2 1 1 2 2 1 2 2 2 2 1 1 1
1 2 2 1 2 2 1 2 2 2 2 2 2 2 2 1 2

  [38] 2 1 1 2 2 2 2 2 1 2 1 2 2 2 2 1 2 1 2 2
1 2 2 2 2 2 2 1 2 1 2 2 2 1 1 2 2

  [75] 2 1 2 2 2 2 2 2 2 1 1 2 1 2 2 2 2 2 1 1
1 1 1 2 2 2 2 2 2 2 1 2 2 2 1 2 2

.

.

.

[8696] 2 1 1 2
1 1 1 1 2 2 1 1 1 1 1 1 1 1 2 1 1 2 1 1 1 1 2 2 2 2 2 2 2 1 2 2 2

[8733] 2 2 1 1
2 1 2 2 1 2 2 1 1 2 1 2 2 1 2 2 2 2 1 2 2 2 1 2 1 2 2 2 1 2 1 1

 

to a single vertical
column? Thanks.

 

I used the
following code to arrive at the above output:

pam(dm,2,diss=TRUE,
medoids=NULL, cluster.only=FALSE,do.swap=TRUE, keep.data=FALSE, trace.lev=0)

 

Penny




      
        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to