When I was teaching introductory Python to scientists and engineers getting their start in data science, I would often get the question: “Why aren’t you teaching this course using R?” At the time, I didn’t have a satisfactory answer. At the time, I didn’t know any R, so I gave a hand-wavy response of “Python is more comfortable to integrate into a larger software ecosystem.” Then, I would proceed to teach in Python. Nevertheless, these questions piqued my curiosity about R. On a whim, I took a couple of R classes on DataCamp. I found myself becoming fond of R, and the next thing I knew, I had completed 23 DataCamp courses that use R. Here is what I found about the R community and the R ecosystem that I find enjoyable:

Technical Rigor

The R community has tended to be more technically rigorous. There are often tutorials in the Python data science community that emphasize coding tutorials without drilling down into the data science principles. In contrast, the R community emphasizes theory first and code second, which is excellent for learning data science and statistics.

Fewer Quotation Marks

"Quoting" "every" "word" "that" "I" "want" "to" "select" "can" "get" "old" "in" "Python". In contrast, with R you can reference many names of data without quotes by simply using a $ sign. Some function calls even allows you to use the column names without the $. At first, I considered this a simple curiosity, but I found this feature very convenient as I worked with R over time.

Tidyverse

The tidyverse packages offer an excellent way to work with data by providing a fluent interface for data manipulations that build upon each other without modifying the original data. You can essentially form pipelines for data processing from raw input data to visualization.

ggplot2

Speaking of visualization, the ggplot2 library is excellent for visualization. Just a couple of lines of simple code offer a declarative way to produce compelling and compelling graphics. I appreciate ggplot2’s concision.

R isn’t a general-purpose programming language, but that isn’t a bad thing.

R is built exclusively for data analysis, statistics, and data science. That means you can start on those tasks immediately without the additional boilerplate of preparing a Python script. With Python, you have a general-purpose scope, which is extremely useful, but that is not always needed to do analyses.

Where will R take me from here?

While R will not supplant Python in my regular job, I will continue learning using R. I will also do more side projects on this blog with R. Indeed, this blog uses blogdown, an R package for blogging.

I look forward to using more R in the future!