December 2017
Beginner to intermediate
470 pages
12h 29m
English
Even though R is an interpreted language, it can go through a small phase before code execution called byte code compilation, which is a less strict compilation procedure. Under some scenarios, it can save between 5% to 10% of time if already optimized functions are not being used heavily. All base R functions are byte code compiled by default.
To byte code compile your functions, you use the cmpfunc() function wrapped around the function you want to compile, after loading the compiler package. You may also send an options arguments such as options = list(optimize = 3)), where the optimize element should be an integer between 0 and 3. The higher the number, the more effort R will put into ...