R code for matrix inverse