Added R script for plot3