R code file, codemog, readme.d as required for the assessment