R studio

I need part 2 done using chapter 7 and 8