get row and column indices of none zero elements in the matrix
nonzero(R_counts)
R_counts
A matrix
An integer matrix where each row is a row, column indices pair