Caching the Inverse of a Matrix, R programming assignment