Solved assignment

Modification of the forked R file with the solved assignment