Is R as versatile as Python?

Alfonso R. Reyes
(4 July 2018)

Online


The short answer is no. R is not a versatile as Python.

R is a comprehensive statistical, mathematical and scientific tool. Its learning curve could be daunting and intimidating but the effort pays if you deal with data every day.

Python and R are not in the same league either. While Python is a generic developing and prototyping tool, R focus is narrower, focusing on providing sciences and engineering with well thought data analytics functions and packages. That did not happen by accident. R was the creation of statisticians and has been improved over the years with brilliant contributions by other scientists.

R focus may not be building general purpose applications as Python but it should be your preferred tool for research, writing papers, demonstrating hypothesis; distributing code among peers, reproducibility; engineering studies, build cumulative functionality with packages; integrate with high performance computing languages such as Fortran, C, C++; creating special data structures with its five different object oriented platforms; prepare print quality documentation and graphics; spending less time in building data analytics solutions through its thousands of packages; etc.

#rstats may not be as “versatile” as Python but R makes a super-glue of other languages (Fortran, Java, C, C++, JavaScript, HTML, SQL; and from the past few months, even Python, with the package reticulate), to produce high quality data analysis. And the best of all: it just works out of the box.

I had my fun in Python. Did my data science crawling with it. #rstats was beyond my understanding at that time. I think when you embark in learning #rstats, you have to adopt, in some way, a scientific mind. It is transformative. I am not the same self after I learned R. It demands so much from you.

Here is the thing. R is not only good at data science, machine learning and statistics, but for engineering too. There is so much brain power put on R development and packages that soon may become the lingua franca in universities, academia and research.

But if we have to measure Python and R by plot quality and web deployment, then we are in a different territory favoring R, with Python paling in comparison. Quick examples of the unfilled void in Python: plotting choices (ggplot2 with its grammar of graphics); Shiny with its web based applications with no need to learn HTML or JavaScript; and the Rmarkdown notebooks which overpower Jupyter notebooks, I believe, by a ratio of 10000 to 1, on the different things you can do with them. All this banquet of goodies does not come “free”. R is a little bit hard to learn and years to master.


comments powered by Disqus