rankMatrix(x): in the case of a sparse x, use method="qr" as we do not want coercion to dense