You can try using the is.singular.matrix function from the matrixcalc package.
To install the package:
install.packages("matrixcalc")
To download it:
library(matrixcalc)
To create a matrix:
mymatrix<-matrix(rnorm(4),2,2)
To check this:
is.singular.matrix(mymatrix)
If the matrix is invertible, it returns FALSE , and if the matrix is synchronous / irreversible, it returns TRUE .
source share