Measure of similarity

#1
Hi all, first off apologies if what I am about to ask was already discussed in other threads, but after some research I could not quite find what I am after. In essence I want to compute similarity coefficients to pairwise between categorical or numerical variables (I could bin numeric values into 5 or 6 categorical classes if necessary to turn numeric values into categories). The count of variables I want to calculate these similarity coefficients range between 50 and 100, and each variable is made of 100 observations (I reckon pairwise comparison can be quite intensive).. The hard problem is that these variables can be (and often are) made of the same value repeated 100 times (for instance variable x is made of 100 observations having the same value of 10 and variable y of 100 observations made of the same value of 20).. I tried with Cramers V coefficient but it was giving me incorrect results since it calculates the variance between pairwise, rather than the actual difference between them (therefore in the previous example Cramers V would give me 1 when instead it should be 0). Could someone please let me know what would be the best approach to my research and possibly point out if it exists any R package that could do the job? Thanks