cachematrix.R final

This is the final commit for cachematrix.R which represents assignment
number 2 of the John Hopkins R Programming course on coursera