R code for STAT101
This is an extra material for STAT101 delivered in University of Canterbury. R is not introduced or accessed in STAT101, but it is essential for future courses and statistic world, this material provides a tip of iceberg about what R can do by reproducing plots in lecture slides and demonstrating sampling distribution/bootstrap distribution and randomisation distribution with R code.
The textbook used in this course is Lock, Lock, Lock Morgan, Lock and Lock, Statistics: Unlocking the Power of Data, 2nd Edition, Wiley. (Lock et al. 2016), most of the data/examples in this demonstration is from this textbook.