R vs. Python: Which is a better programming language for data science?

R vs. Python: Which is a better programming language for data science?

The Python vs. R debate rages on in the data scientist community, Here's how the two coding languages match up.

Python vs. R is a common debate among data scientists, as both languages are useful for data work and among the most frequently mentioned skills in job postings for data science positions. Each language offers different advantages and disadvantages for data science work, and should be chosen depending on the work you are doing.

To help data scientists select the right language, Norm Matloff, a professor of computer science at the University of California Davis wrote a Github post aiming to shed some light on the debate.

Matloff compared R and Python across the following 10 domains to determine which programming language was the better choice:

While this is subjective, Python greatly reduces the use of parentheses and braces when coding, making it more sleek, Matloff wrote in the post.

While data scientists working with Python must learn a lot of material to get started, including NumPy, Pandas and matplotlib, matrix types and basic graphics are already built into base R, Matloff wrote.

With R, "the novice can be doing simple data analyses within minutes," he added. "Python libraries can be tricky to configure, even for the systems-savvy, while most R packages run right out of the box."

The Python Package Index (PyPI) has over 183,000 packages, while the Comprehensive R Archive Network (CRAN) has over 12,000. However, PyPI is rather thin on data science, Matloff wrote.

"For example, I once needed code to do fast calculation of nearest-neighbors of a given data point. (NOT code using that to do classification.)" Matloff wrote. "I was able to immediately find not one but two packages to do this. By contrast, just now I tried to find nearest-neighbor code for Python and at least with my cursory search, came up empty-handed; there was just one implementation that described itself as simple and straightforward, nothing fast."

When you search the following terms on PyPI, nothing comes up, Matloff added: log-linear model; Poisson regression; instrumental variables; spatial data; familywise error rate.

Python's massive growth in recent years is partially fueled by the rise of machine learning and artificial intelligence (AI). While Python offers a number of finely-tuned libraries for image recognition, such as AlexNet, R versions can easily be developed as well, Matloff wrote.

"The Python libraries' power comes from setting certain image-smoothing ops, which easily could be implemented in R's Keras wrapper, and for that matter, a pure-R version of TensorFlow could be developed," Matloff wrote.

Share it:
Share it:

[Social9_Share class=”s9-widget-wrapper”]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You Might Be Interested In

How is Artificial Intelligence Transforming Humanity in Every Dimension

14 Oct, 2022

Mark Minevich is a highly regarded and trusted Digital Cognitive AI Strategist, Artificial Intelligence expert, Global Social Innovation and Technology …

Read more

Pig vs Hive vs SQL – Difference between the Big Data Tools

7 Jun, 2017

Hadoop is the hot new technology and SQL is the old, tried and tested tool for diving deep into big …

Read more

Airline Algorithms – To Delay or Not Delay? Big Data has the Answer

11 Apr, 2017

A few years ago, I boarded a Southwest Airlines flight from Chicago to Kansas. The flight was full and delayed …

Read more

Recent Jobs

IT Engineer

Washington D.C., DC, USA

1 May, 2024

Read More

Data Engineer

Washington D.C., DC, USA

1 May, 2024

Read More

Applications Developer

Washington D.C., DC, USA

1 May, 2024

Read More

D365 Business Analyst

South Bend, IN, USA

22 Apr, 2024

Read More

Do You Want to Share Your Story?

Bring your insights on Data, Visualization, Innovation or Business Agility to our community. Let them learn from your experience.

Get the 3 STEPS

To Drive Analytics Adoption
And manage change

3-steps-to-drive-analytics-adoption

Get Access to Event Discounts

Switch your 7wData account from Subscriber to Event Discount Member by clicking the button below and get access to event discounts. Learn & Grow together with us in a more profitable way!

Get Access to Event Discounts

Create a 7wData account and get access to event discounts. Learn & Grow together with us in a more profitable way!

Don't miss Out!

Stay in touch and receive in depth articles, guides, news & commentary of all things data.