add R script and plot 1-4
script 4 and plot 4 modified