Hi David - I wanted to thank you for your response! This was exactly what I needed. Sincerely, Alicia
On Fri, Jun 17, 2011 at 3:33 PM, David L Carlson [via R] <ml-node+3606287-1326677984-245...@n4.nabble.com> wrote: > You need to use hhid as the rownames for housing.cluster rather than > including it as a variable in the data.frame: > > housing.cluster <-data.frame(htypec1, afforcr1, resyrc1, crowdcc1, chprbos1) > rownames(housing.cluster) <- hhid > > Then it will not be included in the cluster analysis but will be used to > label the dendrogram. > > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On > Behalf Of adlynch > Sent: Thursday, June 16, 2011 12:35 PM > To: [hidden email] > Subject: [R] Specify ID variable in daisy{cluster} > > 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-tp3603136 > p3603136.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [hidden email] 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. > > ______________________________________________ > [hidden email] 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. > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://r.789695.n4.nabble.com/Specify-ID-variable-in-daisy-cluster-tp3603136p3606287.html > To unsubscribe from Specify ID variable in daisy{cluster}, click here. -- Alicia Doyle Lynch, Ph.D. Boston College, Lynch School of Education Department of Counseling, Developmental, and Educational Psychology Chestnut Hill, MA 02467 Phone: (617) 552-4534 e-mail: doyl...@bc.edu -- View this message in context: http://r.789695.n4.nabble.com/Specify-ID-variable-in-daisy-cluster-tp3603136p3630875.html Sent from the R help mailing list archive at Nabble.com. [[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.