Why Scala is better than R

Manpreet Singh
3 min readApr 15, 2021

Welcome back! Yesterday we talked about why Scala maybe a better language than Python, if you want to read that article, here it is:

Now, we have to talk about why Scala maybe a better language than R!

First off

As always, if you have any suggestions, thoughts or just want to connect, feel free to contact / follow me on Twitter! Also, below is a link to some of my favorite resources for learning programming, Python, R, Data Science, etc.


Let’s begin!

Building Bigger Projects

A huge advantage with Scala is the ability of building full fledged applications with this language, R has some ability of this (RShiny), but it still seems that Scala is the better choice here. It’s also been noted that Scala applications / code base tend to be more stable than R, could it be a situation where it’s the opposite? Sure, but it does seem like that happens to be the case right now. Also, since Scala is an object oriented programming language, you have a bit more functionality with this language (with the addition of object oriented projects) than R.

Performance Of Apache Spark

As I mentioned in my other article, this by far is the main reason I would recommend using a language like Scala over R, Apache Spark development. Now, Apache Spark is an engine for large scale data processing, it’s a must have skill for Data Scientists. Apache Spark is actually built using Scala, thus causing more of an importance for that language for this specific job rather than R. Apache Spark is able to be used with R, there are some dependencies and a bit of setup but it’s very possible (using the SparkR package), but since Apache Spark is built with Scala, it may make more sense to use that…

Manpreet Singh

Data Scientist / Engineer!