cachematrix.R updated for Programming Assignment 2