R programming assignment 2 in cachematrix.R