Introduction to R

This course by Dr Kevin Chang introduces the basics of R functions in data sets and optimal visual displays for presenting information.


Thursday 28 February – Friday 1 March 2019


Dr Kevin Chang


With the exception of the final section on regression, the only prerequisite for this course is numerical common sense! Having completed a first-year university-level in statistics would be helpful for this last session at least, but is not a prerequisite.

Course outline

This course assumes that participants will have no prior experience with R. On the first day we will begin with the basics: using R as a calculator; reading in data from a file; and generating summary statistics and contingency tables. With the basics under our belts, we will begin unveiling some of the power of R in manipulating those very large data sets too unwieldy to deal with, in the introduction of in-built R functions that provide shortcuts for performing the same operation across many columns, or rows, of a data set simultaneously.

On the second day we will discuss optimal visual displays for presenting information from different variable types (e.g. continuous, count, categorical, etc.) as we take an in-depth tour of generating publication-quality graphics in R. This will include:

  • Boxplots, scatterplots, and bar charts, including legends
  • Plots presenting information from multiple variables simultaneously
  • The ggplot2 package for R, for even more sophisticated graphical displays

Finally, we will demonstrate how to use R to fit regression-type models to data.