Update cachematrix.R

Coded, but nor working. Giving error as follows.

Error in x$getinverse : $ operator is invalid for atomic vectors

The same error is given by the example.

Error in x$getmean : $ operator is invalid for atomic vectors


Trying to solve.