Computing sparse pairwise distance matrix in R Computing sparse pairwise distance matrix in R r r