Added functions to cachematrix.R