I don't have any experience with your particular problem, but the thing I notice is that mahalanobis is that by default you specify a covariance matrix, and it uses solve to calculate its inverse. If you could supply the inverse covariance matrix (and specify inverted=TRUE to mahalanobis), that might save a lot of memory.
If you cannot externally calculate the inverse before bringing it into R, perhaps if you read only the covariance matrix and inverted it first, before doing anything else? Or perhaps someone else knows some matrix magic? -- View this message in context: http://www.nabble.com/Clustering-with-Mahalanobis-Distance-tp20901487p20949816.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.