Update cachematrix.R

Updated for Programming Assignment 2