A function to sort pairs of integers or factors and identify the pairs
sortPairs(c1, c2, spMat = FALSE)
a vector of length n with value between 0 and N1 < n
a vector of length n with value between 0 and N2 < n
logical: send back the contingency table as sparsely encoded (cost more than the algorithm itself). Default is FALSE