Programming with R

Programming with R

Course Level: Intermediate

The benefit of using a programming language such as R is that we can automate repetitive tasks. This course covers the fundamental techniques such as functions, for loops and conditional expressions. By the end of this course, you will understand what these techniques are and when to use them. This is a one-day intensive course on R.

Book: Programming with R

Start Date:
Venue Details:

Course Details

  • Course Outline
  • Learning Outcomes
  • Materials
  • Prior Knowledge

Course Outline

  • Conditionals: using if and else statements in R
  • Functions: what a function is, how are they used, and how can we construct our own functions.
  • Looping in R: an introduction to the concept of looping in R. In particular for and while loops.
  • Help: The help system in R can at first glance appear daunting, however, after the initial shock, R’s documentation is second to none.
  • Project structure: Practical tips on how to structure a project.

Learning Outcomes

Session 1:

By the end of the session 1 participants will…

  • understand basic functions, multiple arguments and variable scopes.
  • have a thorough understanding for loops.
  • be able to apply basic functions.

Session 2:

By the end of the session 2 participants will…

  • have a thorough understanding of conditionals such as if, else and else if statements.
  • be familiar with possible R workflows such as directory structure and working with directories.
  • understand how the aforementioned techniques can be applied to their own data.
  • understand how these techniques will improve efficiency and results.
  • understand where to find help in R using resources and the help() function.

This course does not include:

  • Much detail on using the {tidyverse} to manipulate and clean data, for this see the Data Wrangling with Tidyverse course run by Jumping Rivers.


  • Page 1 of example course material for Programming with R
  • Page 2 of example course material for Programming with R
  • Page 3 of example course material for Programming with R
  • Page 4 of example course material for Programming with R
  • Page 5 of example course material for Programming with R

Prior Knowledge

The course follows on from the Introduction to R course. It is assumed that all students have attended this course (or have equivalent skills). This course is suitable for all fields of work. Previous attendees include biologists, statisticians, accountants, engineers & students, i.e., anyone who uses a spreadsheet!

Attendee Feedback