Score rows and columns via correspondence analysis, then sort the scores.
sort.table(x)
x
mosaicplot
data(blood) sort.table(blood)