[R] Clustering groups according to multiple variables

2012-10-31 Thread Matthew Ouellette
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=hc

[R] Clustering groups according to multiple variables

2012-10-31 Thread Matthew Ouellette
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=hc