[R] Specify ID variable in daisy{cluster}

adlynch aliciadlynch at gmail.com
Thu Jun 16 19:34:53 CEST 2011


Hi All - I am using the daisy function from the cluster library to create a
dissimilarity matrix.  I'm going to use that matrix to run a cluster
analysis.  My participants are identified with the variable, hhid.  However,
when I try to keep hhid in the dataset that I use to create the
dissimilarity matrix, daisy uses it to create the matrix rather than
ignoring it as an ID variable.  I need to have the ID variable so I can
later on identify which cluster each participant was classified as.  Any
thoughts would be much appreciated!

housing.cluster <-data.frame(hhid, htypec1, afforcr1, resyrc1, crowdcc1,
chprbos1)
housingdiss <- daisy(housing.cluster, metric="gower")


--
View this message in context: http://r.789695.n4.nabble.com/Specify-ID-variable-in-daisy-cluster-tp3603136p3603136.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list