Added the chapter 4 and 5's R scripts