Suppose I have 4 variables (x, y, z, r) and 10 obs. I run cluster analysis in R and get 2 clusters that fit. Now I want these clusters to match the data. Thus, the table will look like this:
Respondent x,y,z,r cluster 1 2 3 . . 10
Can someone please tell me the code to get this table. The code I used for cluster analysis is as follows:
##Scaling cluster1=scale(cluster) ###Hierarchial Cluster cluster1=dist(cluster,method="euclidean") summary(cluster1) cluster2=hclust(cluster1,method="ward") plot(cluster2)
Thanks A
source share