Hi guys, I've been using the kmeans and hclust functions for some time now and was wondering if I could specify a custom metric when passing my data frame into hclust as a distance matrix. Actually, kmeans doesn't even take a distance matrix; it takes the data frame directly. I was wondering if there's a way or if there's a package that lets you create distance matrices from non-standard metrics, e.g., KL-divergence (which is not really one), but metrics used often in information theory. I'm assuming kmeans just assumes the euclidean metric, but it would be nice to customize that as well. Is stuff out there, or would I have create my own?
Thanks, Vivek ______________________________________________ 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.