We consider permutations of any given squared matrix and the generalized LU(r) factorization of the permuted matrix that reveals the rank deficiency of the matrix. Chan has considered the case with nearly rank deficiency equal to one. This paper extends his results to the case with nearly rank deficiency greater than one. Two applications in constrained optimization are given. We are primarily interested in the existence of such factorizations. In addition to the theories, we also present an efficient two-pass rank revealing LU(r) algorithm.