Adding R code to generate the 4 different plots

Adding R code to generate the 4 different plots