[R] Extract an invertible submatrix

Bertrand Marc beberking at gmail.com
Sun Oct 2 20:19:30 CEST 2016

Dear R helpers,

I am looking for an efficient way to extract (any) one of the biggest invertible submatrix.

I have a rectangular matrix A (p x n), with rank k <= min(p, n). I would like to get a submatrix (k x k) invertible, or even better, the list of rows and columns of A which
would form the submatrix (A[rows, columns] would be invertible, with length(rows)=length(columns)=k).

This is the general problem, but in my particular R code, the rank of A would be p (p<n), so I only need to select p columns to get the submatrix. But I am not sure it is
For now, my (very bad) solution would be to try every submatrix until I find one invertible.

Do you think of any solution which would be more efficient ?

Best regards,

More information about the R-help mailing list