- The latest version of R is a major release! It comes with a ton of new features, including performance and speed improvements
- All R packages will now be byte-compiled, hence boosting packages installed from GitHub
- You may need to re-install all previously installed R packages; old scripts however will continue to work normally
Here’s some exciting news for R users! R 3.5.0 has been released this week and it comes packed with new features, major improvements and bug fixes. The most exciting thing packaged into the entire update? Awesome speed improvements!
Despite the recent rise of the Python programming language, R continues to maintain a massive and loyal user base. It is still the tool of choice for many organizations, data scientists and researchers. I personally love using R and it’s my go-to tool any time I want to perform exploratory data analysis on a dataset.
The biggest update in this release is under the hood – speed and performance improvement! ALTREP, an alternative representation for R objects, has been added to the R engine. How does this improve performance? ALTREP uses more efficient representations of vectors. This leads to less memory usage and faster computation.
Another new feature, which will be more visible to users, is that ALL packages will now be byte-compiled on installation. R’s base packages and those uploaded on CRAN already had this feature but this move will benefit packages installed from GitHub. Also, you will notice R performing better when a lot of packages are loaded in the same time frame.
Apart from these, we have summarised a few other additions and improvements below which we felt are important:
order()to sort its levels, rather than
- The performance of functions like
readlines(), scan() and read.table()has been improved
- Previously, it was possible to pass only one single argument on the ‘#!’ line in Linux.
Rscriptcan now accept more than one argument given on the ‘#!’ line of a script
printCoefmat()now also works without column names.
But take note – since this classifies as a major release, you will have to re-install any packages you use in R. Any old scripts you have should still continue to work without need for modifications. But it’s best to be safe before you upgrade so ensure you perform thorough checks and take appropriate backups.
Our take on this
Given the significant changes in this release, it would be prudent to wait for the maintenance release if you are using it for production. However, if you’re a data scientist, update away! There are a lot of benefits of doing this. We tried out a few high-level operations on dataframes and can report that we got the output 3 times faster than the previous version.
Let us know how much quicker your code runs on updating!
Subscribe to AVBytes here to get regular data science, machine learning and AI updates in your inbox!
You can also read this article on Analytics Vidhya's Andorid APP