created R scripts for plots 1, 2, 3, 4