Programming with R

Programming with R

Course Level: Intermediate (6 hours)

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.

Download course details

Book: Programming with R

Start Date:
Price:
Venue Details:
Time:
Duration:

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.

Course Details

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:

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!

Materials Preview

Attendee Feedback

  • “We started from the beginning and achieved a lot by the end. I’m not scared of R any more. It was actually fun!”
  • “You cover all the aspects that we need to learn to get started.”
  • “The course was excellent, as it has allowed me to do all the analysis and graphics for my PhD thesis in R, which has certainly saved me a lot of time and allowed me to do some advanced analysis that would have just been too difficult to do otherwise.”