Revert "Update cachematrix.R"

This reverts commit bfe56211d1d360c81a8eb7b703db36a3aba4ff8e.
Revert "Revert "Update cachematrix.R""

This reverts commit 41b51c4649fcc44246785c48899dd63ad05f8a97.