I'm trying to calculate a Mahalanobis-type pairwise distance matrix in R. I have 33 individuals, each with 10 variables. The idea is to get a distance matrix D, where
$$D_{i,j}=(\mathbf{X}_i-\mathbf{X}_j)W^{-1}(\mathbf{X}_i-\mathbf{X}_j)^T$$
However I haven't been able build proper code for it.
?mahalanobisinRand look the documentation. – MYaseen208 Jul 19 '12 at 21:56