Efficient R Programming
In the most expensive projects in terms of computational performance, it is important to know how to optimize the performance of the algorithm created. Therefore it is important to have a tool to understand what the bottlenecks are and it is important to know how to orientate yourself with the possible solutions. In a nutshell: can I solve this quickly by optimizing the R code or do I need to rewrite the affected part in a compiled language? In this course we will see how to do profiling (analysis of computational run time) directly from RStudio, what are the main rules to be observed to write efficient R code, we will see the basics of the interaction between C++ and R and we will try to understand how much performance is gained with this tool and at what price.
- Benchmark R code
- I/O benchmark and optimization
- Understand the copy-on-modify and the OOP overhead
- Optimal design
- Introduction to RCpp and compiled languages
- Code management with Git and Git Flow
What you will be able to do
- Write better code at the first try
- Benchmark your code and improve it. The run time can easily be reduced to 20% at this stage.
- Understand which part to rewrite with a compiled language and understand the gain/cost proportion
Good R programming knowledge with loops and Functions.
This is an advanced course for professionals and researchers who need to write performing code and know where and how to work in order to improve it.