Update cachematrix.R

Here's my update to the cachematrix.R program