Final solution added
Completed the R markdown file