Dear R help,
I am trying to cluster my data according to "group" in a data frame such as the following: df=data.frame(group=rep(c("a","b","c","d"),10),(replicate(100,rnorm(40)))) I'm not sure how to tell hclust() that I want to cluster according to the group variable. For example: dfclust=hclust(dist(df),"ave") plot(dfclust) Clusters according to each individual row. What I'm looking for is an unrooted tree that will show similarity/dissimilarity among groups according to the data set as a whole. I appreciate the help, MO [[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.