Editing the R file to cache matrix inverse