Myself Ph.D. in advanced analytics having 10+ years of experience in developing and delivering analytical projects using open source R (including in-memory computing), and can deliver your requirement with R, accompanied by a step-by-step word document, what each line or code means.