Hi, The goal is to use Pearson's Phi coefficient to create a similarity matrix from a matrix. The problem is that the DIST command doesn't do it, and I don't know how manipulate the R language well enough to create a substitute. The question is simple: what is a basic way of using custom formulas to compare every row in a matrix, like DIST does? -Sasha Goodman [[alternative HTML version deleted]]