Training Course Details

Building an R Package

Course Level: Advanced

This is a one-day intensive course on building a package in R. This course will be a mixture of lectures and computer practicals. The main focus will be getting a working R package ready for distribution.


No Events Currently Scheduled

Sorry, there are no upcoming events for this course, but please get in touch if you would like to be kept informed when events are scheduled in the future.

View our full training course calendar >>

Course Details

Course Outline

Participants can bring their own code or they can use the provided example code to write a fully functional R package.

  • Why create an R package.
  • What is in an R package.
  • Writing documentation with roxygen2.
  • Creating packages with RStudio.
  • Distributing your package.

View course PDF

Learning Outcomes

By the end of the day participants will…

  • have an understanding of CRAN and how R packages work
  • be able to document package functions
  • be able to add datasets, vignettes and unit tests to an R package
  • have produced their own working R package

Course Structure

This course will be structured as follows:

  • 9:00 — 9:15: Registration and coffee
  • 9:15 — 12:15: Lecture & practical session
  • 12:15 — 1:15: Lunch (not provided)
  • 1:15 — 2:40: Lecture & practical
  • 2:40 — 3:00: Coffee break
  • 3:00 — 4:30: Practical session

These times are intended to give a flavour of how the course is run and are subject to change.

Prior Knowledge

It is assumed that all applicants have a basic knowledge of R. Attending the introduction to R course and programming with R is sufficient.