Committing cahcematrix.r

Submission for week 2 assignment by Mridul Mishra first time