Efficient R Programming
Accredited by the RSS
Course Level: Advanced
(6 hours)
This course is for anyone who wants to make their R code faster to type, faster to run and more scalable. During the course, we’ll cover the main R sins (and how to avoid them), dabble with hardware, look at running in parallel and think about efficient R data structure. This course should be useful to people with a range of skill levels.
Book: Efficient R Programming
- 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
- Why is your code slow? Code profiling: which part of the code should you optimise.
- Efficient data structures: Object growth and memory allocation.
- Avoiding loops: Accessing the underlying C code faster.
- Parallel computing: An introduction to multi-core computing.
Jumping Rivers staff quite literally wrote the book on Efficient R programming. Dr Colin Gillespie, a consultant at Jumping Rivers and Senior Statistics Lecturer in the School of Mathematics & Statistics at Newcastle University is the author of the recent O’Reilly book.
Learning outcomes
Session 1:
By the end of session 1, participants will…
- have an understanding of how computers use memory and test their RAM using {benchmarkme}.
- know what benchmarks are and have the ability to use {bench} to identify which areas of R code needs optimising.
- have a good understanding of how to efficiently manage memory within an R session.
Session 2:
By the end of session 2, participants will…
- understand the common efficiency mistakes made within R scripts such as object growth and object creation.
- understand why efficiency mistakes slows down code and how to apply faster alternatives.
- have the ability to improve the efficiency of R code using the {parallel} package for parallel computing.
- be able to avoid the key R sins of inefficiency, such as vector growth.
This course does not include:
- Specific efficient R programming for collaboration, but following the key takeaways from the course would help.
- Specific efficiency tips for the {tidyverse}, but the ability to test your own code is taught.
Prior knowledge
It will be assumed that participants are familiar with R. In particular, functions and for loops. Attending the programming with R course will be sufficient.