Photo by Blake Alexander on Unsplash

Is R on the decline?

Berk Orbay
DataBulls
Published in
5 min readNov 21, 2023

--

R programming language is one of my all time favorites. It is the most popular alternative for “X vs Y” comparisons for data science (mostly against Python).

R with tidyverse is great for data analysis. It is has a low learning curve, easy setup and you can show instant results. It has a great deal of mathematical tools and packages. But if you need something more on the developer side (API, cloud deployment, scalability, deep learning etc.). Recently, I am developing more with Python than R.

It might seem a bit controversial to write this blog post as I am currently teaching a data course with R. Yet, each year I am evaluating whether to switch to another language to teach. This counts as an evaluation.

Rankings

Let’s get the rankings out of the way first…

TIOBE index is one of the staple metrics used to see how popular a programming language is. It is not the right one in my opinion but whatever. R’s ranking has decreased a whooping 7 places (from 12th to 19th) in one year (Nov 2022 — Nov 2023). R’s top ranking was 8th in August 2020.

TIOBE Index

Each year Stackover Developer Survey provides a detailed account of the programming landscape. Let’s compare most popular languages of 2022 and 2023. It is mostly stable.

Stackoverflow Developer Survey Most Popular Programming Languages 2022 vs 2023

Stackoverflow removed “dreaded” label in its 2023 survey but in 2022 it was leaning more on the dreaded side.

Stackoverflow Developer Survey 2022 Loved vs Dreaded

Tidyverse

If you inquire deeper you will also see tidyverse among the most popular frameworks in both 2022 and 2023. In 2023, it is one of the most “Admired” frameworks ever.

Who uses R?

There are other rankings as well. I personally don’t think these rankings do justice to R. These rankings mix hardcore developers with other groups (e.g., academics, scientists, business analysts etc.). These groups are not proportionally represented in these surveys. On the other hand, these rankings show R’s general adoption in the wider ecosystem.

I would like to refer to R section of Jetbrains’ State of the Developer Ecosystem report here. There are two very much striking visuals on that report that I would like to present them below (show it to a developer friend).

Also see the Data Science section for more insights.

My thoughts

Following items are my thoughts and perception. I might be wrong about some or all of them, please correct me if I’m wrong. In summary, Python is eating through R’s domain and it has huge support.

  • R, as a language, is not getting any better. No major breakthroughs in the core.
  • On the other hand Python is getting better and better. “3.x vs 2.x” nonsense is gone. Performance improvements at each new version is significant.
  • Tidyverse packages dplyr + ggplot2 reached to a certain level of maturity since 1.0.0. It is like LaTeX now.
  • There is no visualization tool like ggplot2 in Python, or in any other language for that matter.
  • RStudio rebranded to Posit and announced closer interaction with Python.
  • Python is transferring some of the huge upsides of R with Quarto (RMarkdown replacement) and ShinyPy.
  • R is nowhere near getting Python treatment in cloud services. Working on production environments is more convenient in Python.
  • “Data science” (kind of) evolved from academic based applications to “deep learning”. Python also caught up with R in tree based models, forecasting (to an extent) and other mathematical approaches. Major frameworks (e.g., torch, tensorflow) work with Python.
  • I still cannot wrap my head around R’s debugging process.

I would say R adoption is slightly on the decline.

Switch or no switch?

From my perspective, I switched a while ago. Though my needs are not your needs, necessarily. If I were to stay in a data analysis (get raw data, preprocess, do analysis, report process) position, I would still be coding in R and tidyverse. R and tidyverse are rock solid for getting Excel/Word/Powerpoint superpowers.

I will still continue to teach R in my course because I mostly teach tidyverse, Quarto and Shiny. There is no way I can teach Pandas instead of dplyr in such a short amount of time. My course is about data analysis and communication of findings.

I can distill the decision to a single Yes/No question: Do you mostly work on your computer and, do only analysis and maybe run small (no GPU) models? If Yes, definitely R. If you do something more, then consider other options.

More…

--

--

Berk Orbay
DataBulls

Current main interests are #OR and #RL. You may reach me at Linkedin.