R functions in Chapter 3,4,6,7,9,10,11,12,14,15