Session 3: Learning the basics of R - Part 2

Creating and manipulating objects, and extending R using packages

This session introduces the use of R packages to extend functionalities for data handling and analysis.

In this session, the students will continue to work through using R to work with data and will be introduced to more built-in functions in R for performing data analysis. They will also be introduced to R packages and how they extend the functionalities of R specifically with regard to computing and statistical analysis. Students will be taught how to install and load R packages and be given a background and introduction to object-oriented programming.

Further Reading

  • Grolemund G. (2014). R Packages. In Hands-on programming with R : write your own functions and simulations. https://rstudio-education.github.io/hopr/packages2.html

  • Myatt M. Extending R with packages. In Practical R for Epidemiologists. https://practical-r.org/exercise5.html

Teaching Material

Slides can be viewed here.

PDF version of slides can be downloaded here.

R scripts for slides available here.