final plot 4 and R code

Removed debug code