Committing modified version for cachematrix.R