added my functions into cachematrix.R for RProg assignment 2