Revert "Update cachematrix.R"

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

This reverts commit 45dc2c5232e7b272d08d18200c727c13790848a5.